code: def ema(close, length=None, talib=None, offset=None, **kwargs):
      """Indicator: Exponential Moving Average (EMA)"""
      # Validate Arguments
      length = int(length) if length and length > 0 else 10
      adjust = kwargs.pop("adjust", False)
      sma = kwargs.pop("sma", True)
      close = verify_series(close, length)
      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 EMA
  
          ema = EMA(close, length)
      else:
          if sma:
              close = close.copy()
              sma_nth = close[0:length].mean()
              close[: length - 1] = npNaN
              close.iloc[length - 1] = sma_nth
          ema = close.ewm(span=length, adjust=adjust).mean()
  
      # Offset
      if offset != 0:
          ema = ema.shift(offset)
  
      # Handle fills
      if "fillna" in kwargs:
          ema.fillna(kwargs["fillna"], inplace=True)
      if "fill_method" in kwargs:
          ema.fillna(method=kwargs["fill_method"], inplace=True)
  
      # Name & Category
      ema.name = f"EMA_{length}"
      ema.category = "overlap"
  
      return ema
  
label_desc: Use image node_id 1 for calling a global function with example usage: ema(close, length, talib, offset) and returns: ema