code: def ad(
      high,
      low,
      close,
      volume,
      open_=None,
      talib=None,
      offset=None,
      **kwargs,
  ):
      """Indicator: Accumulation/Distribution (AD)"""
      # Validate Arguments
      high = verify_series(high)
      low = verify_series(low)
      close = verify_series(close)
      volume = verify_series(volume)
      offset = get_offset(offset)
      mode_tal = bool(talib) if isinstance(talib, bool) else True
  
      # Calculate Result
      if Imports["talib"] and mode_tal:
          from talib import AD
  
          ad = AD(high, low, close, volume)
      else:
          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
  
          high_low_range = non_zero_range(high, low)
          ad *= volume / high_low_range
          ad = ad.cumsum()
  
      # Offset
      if offset != 0:
          ad = ad.shift(offset)
  
      # Handle fills
      if "fillna" in kwargs:
          ad.fillna(kwargs["fillna"], inplace=True)
      if "fill_method" in kwargs:
          ad.fillna(method=kwargs["fill_method"], inplace=True)
  
      # Name and Categorize it
      ad.name = "AD" if open_ is None else "ADo"
      ad.category = "volume"
  
      return ad
  
label_desc: Use image node_id 1 for calling a global function with example usage: ad(high, low, close, volume, open_, talib, offset) and returns: ad