code: def cmo(
      close,
      length=None,
      scalar=None,
      talib=None,
      drift=None,
      offset=None,
      **kwargs,
  ):
      """Indicator: Chande Momentum Oscillator (CMO)"""
      # Validate Arguments
      length = int(length) if length and length > 0 else 14
      scalar = float(scalar) if scalar else 100
      close = verify_series(close, length)
      drift = get_drift(drift)
      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 CMO
  
          cmo = CMO(close, length)
      else:
          mom = close.diff(drift)
          positive = mom.copy().clip(lower=0)
          negative = mom.copy().clip(upper=0).abs()
  
          if mode_tal:
              pos_ = rma(positive, length)
              neg_ = rma(negative, length)
          else:
              pos_ = positive.rolling(length).sum()
              neg_ = negative.rolling(length).sum()
  
          cmo = scalar * (pos_ - neg_) / (pos_ + neg_)
  
      # Offset
      if offset != 0:
          cmo = cmo.shift(offset)
  
      # Handle fills
      if "fillna" in kwargs:
          cmo.fillna(kwargs["fillna"], inplace=True)
      if "fill_method" in kwargs:
          cmo.fillna(method=kwargs["fill_method"], inplace=True)
  
      # Name and Categorize it
      cmo.name = f"CMO_{length}"
      cmo.category = "momentum"
  
      return cmo
  
label_desc: Use image node_id 1 for calling a global function with example usage: cmo(close, length, scalar, talib, drift, offset) and returns: cmo