code: def ppo(
      close,
      fast=None,
      slow=None,
      signal=None,
      scalar=None,
      mamode=None,
      talib=None,
      offset=None,
      **kwargs,
  ):
      """Indicator: Percentage Price Oscillator (PPO)"""
      # Validate Arguments
      fast = int(fast) if fast and fast > 0 else 12
      slow = int(slow) if slow and slow > 0 else 26
      signal = int(signal) if signal and signal > 0 else 9
      scalar = float(scalar) if scalar else 100
      mamode = mamode if isinstance(mamode, str) else "sma"
      if slow < fast:
          fast, slow = slow, fast
      close = verify_series(close, max(fast, slow, signal))
      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 PPO
  
          ppo = PPO(close, fast, slow, tal_ma(mamode))
      else:
          fastma = ma(mamode, close, length=fast)
          slowma = ma(mamode, close, length=slow)
          ppo = scalar * (fastma - slowma)
          ppo /= slowma
  
      signalma = ma("ema", ppo, length=signal)
      histogram = ppo - signalma
  
      # Offset
      if offset != 0:
          ppo = ppo.shift(offset)
          histogram = histogram.shift(offset)
          signalma = signalma.shift(offset)
  
      # Handle fills
      if "fillna" in kwargs:
          ppo.fillna(kwargs["fillna"], inplace=True)
          histogram.fillna(kwargs["fillna"], inplace=True)
          signalma.fillna(kwargs["fillna"], inplace=True)
      if "fill_method" in kwargs:
          ppo.fillna(method=kwargs["fill_method"], inplace=True)
          histogram.fillna(method=kwargs["fill_method"], inplace=True)
          signalma.fillna(method=kwargs["fill_method"], inplace=True)
  
      # Name and Categorize it
      _props = f"_{fast}_{slow}_{signal}"
      ppo.name = f"PPO{_props}"
      histogram.name = f"PPOh{_props}"
      signalma.name = f"PPOs{_props}"
      ppo.category = histogram.category = signalma.category = "momentum"
  
      # Prepare DataFrame to return
      data = {
          ppo.name: ppo,
          histogram.name: histogram,
          signalma.name: signalma,
      }
      df = DataFrame(data)
      df.name = f"PPO{_props}"
      df.category = ppo.category
  
      return df
  
imports: from pandas import DataFrame
  from pandas_ta import Imports
  from pandas_ta.overlap import ma
  from pandas_ta.utils import get_offset, tal_ma, verify_series
label_desc: Use image node_id 1 for calling a global function with example usage: ppo(close, fast, slow, signal, scalar, mamode, talib, offset) and returns: df