code: def chop(
      high,
      low,
      close,
      length=None,
      atr_length=None,
      ln=None,
      scalar=None,
      drift=None,
      offset=None,
      **kwargs,
  ):
      """Indicator: Choppiness Index (CHOP)"""
      # Validate Arguments
      length = int(length) if length and length > 0 else 14
      atr_length = (
          int(atr_length)
          if atr_length is not None and atr_length > 0
          else 1
      )
      ln = bool(ln) if isinstance(ln, bool) else False
      scalar = float(scalar) if scalar else 100
      high = verify_series(high, length)
      low = verify_series(low, length)
      close = verify_series(close, length)
      drift = get_drift(drift)
      offset = get_offset(offset)
  
      if high is None or low is None or close is None:
          return
  
      # Calculate Result
      diff = high.rolling(length).max() - low.rolling(length).min()
  
      atr_ = atr(high=high, low=low, close=close, length=atr_length)
      atr_sum = atr_.rolling(length).sum()
  
      chop = scalar
      if ln:
          chop *= (npLn(atr_sum) - npLn(diff)) / npLn(length)
      else:
          chop *= (npLog10(atr_sum) - npLog10(diff)) / npLog10(length)
  
      # Offset
      if offset != 0:
          chop = chop.shift(offset)
  
      # Handle fills
      if "fillna" in kwargs:
          chop.fillna(kwargs["fillna"], inplace=True)
      if "fill_method" in kwargs:
          chop.fillna(method=kwargs["fill_method"], inplace=True)
  
      # Name and Categorize it
      chop.name = (
          f"CHOP{'ln' if ln else ''}_{length}_{atr_length}_{scalar}"
      )
      chop.category = "trend"
  
      return chop
  
imports: from numpy import log10
  from numpy import log
  from pandas_ta.volatility import atr
  from pandas_ta.utils import get_drift, get_offset, verify_series
label_desc: Use image node_id 1 for calling a global function with example usage: chop(high, low, close, length, atr_length, ln, scalar, drift, offset) and returns: chop