code: def xsignals(
      signal,
      xa,
      xb,
      above: bool = True,
      long: bool = True,
      asbool: bool = None,
      trend_reset: int = 0,
      trade_offset: int = None,
      offset: int = None,
      **kwargs,
  ):
      """Indicator: Cross Signals"""
      # Validate Arguments
      signal = verify_series(signal)
      offset = get_offset(offset)
  
      # Calculate Result
      if above:
          entries = cross_value(signal, xa)
          exits = -cross_value(signal, xb, above=False)
      else:
          entries = cross_value(signal, xa, above=False)
          exits = -cross_value(signal, xb)
      trades = entries + exits
  
      # Modify trades to fill gaps for trends
      trades.replace({0: npNaN}, inplace=True)
      trades.interpolate(method="pad", inplace=True)
      trades.fillna(0, inplace=True)
  
      trends = (trades > 0).astype(int)
      if not long:
          trends = 1 - trends
  
      tskwargs = {
          "asbool": asbool,
          "trade_offset": trade_offset,
          "trend_reset": trend_reset,
          "offset": offset,
      }
      df = tsignals(trends, **tskwargs)
  
      # Offset handled by tsignals
      DataFrame(
          {f"XS_LONG": df.TS_Trends, f"XS_SHORT": 1 - df.TS_Trends}
      )
  
      # Handle fills
      if "fillna" in kwargs:
          df.fillna(kwargs["fillna"], inplace=True)
      if "fill_method" in kwargs:
          df.fillna(method=kwargs["fill_method"], inplace=True)
  
      # Name & Category
      df.name = f"XS"
      df.category = "trend"
  
      return df
  
imports: from numpy import nan
  from pandas import DataFrame
  from .tsignals import tsignals
  from pandas_ta.utils._signals import cross_value
  from pandas_ta.utils import get_offset, verify_series
label_desc: Use image node_id 1 for calling a global function with example usage: xsignals(signal, xa, xb, above, long, asbool, trend_reset, trade_offset, offset) and returns: df