code: def efi(
      close,
      volume,
      length=None,
      mamode=None,
      drift=None,
      offset=None,
      **kwargs,
  ):
      """Indicator: Elder's Force Index (EFI)"""
      # Validate arguments
      length = int(length) if length and length > 0 else 13
      mamode = mamode if isinstance(mamode, str) else "ema"
      close = verify_series(close, length)
      volume = verify_series(volume, length)
      drift = get_drift(drift)
      offset = get_offset(offset)
  
      if close is None or volume is None:
          return
  
      # Calculate Result
      pv_diff = close.diff(drift) * volume
      efi = ma(mamode, pv_diff, length=length)
  
      # Offset
      if offset != 0:
          efi = efi.shift(offset)
  
      # Handle fills
      if "fillna" in kwargs:
          efi.fillna(kwargs["fillna"], inplace=True)
      if "fill_method" in kwargs:
          efi.fillna(method=kwargs["fill_method"], inplace=True)
  
      # Name and Categorize it
      efi.name = f"EFI_{length}"
      efi.category = "volume"
  
      return efi
  
label_desc: Use image node_id 1 for calling a global function with example usage: efi(close, volume, length, mamode, drift, offset) and returns: efi