code: def apo(
      close,
      fast=None,
      slow=None,
      mamode=None,
      talib=None,
      offset=None,
      **kwargs,
  ):
      """Indicator: Absolute Price Oscillator (APO)"""
      # Validate Arguments
      fast = int(fast) if fast and fast > 0 else 12
      slow = int(slow) if slow and slow > 0 else 26
      if slow < fast:
          fast, slow = slow, fast
      close = verify_series(close, max(fast, slow))
      mamode = mamode if isinstance(mamode, str) else "sma"
      offset = get_offset(offset)
      mode_tal = bool(talib) if isinstance(talib, bool) else True
  
      if close is None:
          return
  
      # Calculate Result
      if Imports["talib"] and mode_tal:
          from talib import APO
  
          apo = APO(close, fast, slow, tal_ma(mamode))
      else:
          fastma = ma(mamode, close, length=fast)
          slowma = ma(mamode, close, length=slow)
          apo = fastma - slowma
  
      # Offset
      if offset != 0:
          apo = apo.shift(offset)
  
      # Handle fills
      if "fillna" in kwargs:
          apo.fillna(kwargs["fillna"], inplace=True)
      if "fill_method" in kwargs:
          apo.fillna(method=kwargs["fill_method"], inplace=True)
  
      # Name and Categorize it
      apo.name = f"APO_{fast}_{slow}"
      apo.category = "momentum"
  
      return apo
  
label_desc: Use image node_id 1 for calling a global function with example usage: apo(close, fast, slow, mamode, talib, offset) and returns: apo