code: def sma(close, length=None, talib=None, offset=None, **kwargs):
      """Indicator: Simple Moving Average (SMA)"""
      # Validate Arguments
      length = int(length) if length and length > 0 else 10
      min_periods = (
          int(kwargs["min_periods"])
          if "min_periods" in kwargs
          and kwargs["min_periods"] is not None
          else length
      )
      close = verify_series(close, max(length, min_periods))
      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 SMA
  
          sma = SMA(close, length)
      else:
          sma = close.rolling(length, min_periods=min_periods).mean()
  
      # Offset
      if offset != 0:
          sma = sma.shift(offset)
  
      # Handle fills
      if "fillna" in kwargs:
          sma.fillna(kwargs["fillna"], inplace=True)
      if "fill_method" in kwargs:
          sma.fillna(method=kwargs["fill_method"], inplace=True)
  
      # Name & Category
      sma.name = f"SMA_{length}"
      sma.category = "overlap"
  
      return sma
  
label_desc: Use image node_id 1 for calling a global function with example usage: sma(close, length, talib, offset) and returns: sma