code: def cmf(
      high,
      low,
      close,
      volume,
      open_=None,
      length=None,
      offset=None,
      **kwargs,
  ):
      """Indicator: Chaikin Money Flow (CMF)"""
      # Validate Arguments
      length = int(length) if length and length > 0 else 20
      min_periods = (
          int(kwargs["min_periods"])
          if "min_periods" in kwargs
          and kwargs["min_periods"] is not None
          else length
      )
      _length = max(length, min_periods)
      high = verify_series(high, _length)
      low = verify_series(low, _length)
      close = verify_series(close, _length)
      volume = verify_series(volume, _length)
      offset = get_offset(offset)
  
      if high is None or low is None or close is None or volume is None:
          return
  
      # Calculate Result
      if open_ is not None:
          open_ = verify_series(open_)
          ad = non_zero_range(close, open_)  # AD with Open
      else:
          ad = 2 * close - (high + low)  # AD with High, Low, Close
  
      ad *= volume / non_zero_range(high, low)
      cmf = ad.rolling(length, min_periods=min_periods).sum()
      cmf /= volume.rolling(length, min_periods=min_periods).sum()
  
      # Offset
      if offset != 0:
          cmf = cmf.shift(offset)
  
      # Handle fills
      if "fillna" in kwargs:
          cmf.fillna(kwargs["fillna"], inplace=True)
      if "fill_method" in kwargs:
          cmf.fillna(method=kwargs["fill_method"], inplace=True)
  
      # Name and Categorize it
      cmf.name = f"CMF_{length}"
      cmf.category = "volume"
  
      return cmf
  
label_desc: Use image node_id 1 for calling a global function with example usage: cmf(high, low, close, volume, open_, length, offset) and returns: cmf