code: def vwap(
      high, low, close, volume, anchor=None, offset=None, **kwargs
  ):
      """Indicator: Volume Weighted Average Price (VWAP)"""
      # Validate Arguments
      high = verify_series(high)
      low = verify_series(low)
      close = verify_series(close)
      volume = verify_series(volume)
      anchor = (
          anchor.upper()
          if anchor and isinstance(anchor, str) and len(anchor) >= 1
          else "D"
      )
      offset = get_offset(offset)
  
      typical_price = hlc3(high=high, low=low, close=close)
      if not is_datetime_ordered(volume):
          print(
              f"[!] VWAP volume series is not datetime ordered. Results may not be as expected."
          )
      if not is_datetime_ordered(typical_price):
          print(
              f"[!] VWAP price series is not datetime ordered. Results may not be as expected."
          )
  
      # Calculate Result
      wp = typical_price * volume
      vwap = wp.groupby(wp.index.to_period(anchor)).cumsum()
      vwap /= volume.groupby(volume.index.to_period(anchor)).cumsum()
  
      # Offset
      if offset != 0:
          vwap = vwap.shift(offset)
  
      # Handle fills
      if "fillna" in kwargs:
          vwap.fillna(kwargs["fillna"], inplace=True)
      if "fill_method" in kwargs:
          vwap.fillna(method=kwargs["fill_method"], inplace=True)
  
      # Name & Category
      vwap.name = f"VWAP_{anchor}"
      vwap.category = "overlap"
  
      return vwap
  
label_desc: Use image node_id 1 for calling a global function with example usage: vwap(high, low, close, volume, anchor, offset) and returns: vwap