code: def swma(close, length=None, asc=None, offset=None, **kwargs):
      """Indicator: Symmetric Weighted Moving Average (SWMA)"""
      # 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
      asc = asc if asc else True
      close = verify_series(close, length)
      offset = get_offset(offset)
  
      if close is None:
          return
  
      # Calculate Result
      triangle = symmetric_triangle(length, weighted=True)
      swma = close.rolling(length, min_periods=length).apply(
          weights(triangle), raw=True
      )
      # swma = close.rolling(length).apply(weights(triangle), raw=True)
  
      # Offset
      if offset != 0:
          swma = swma.shift(offset)
  
      # Handle fills
      if "fillna" in kwargs:
          swma.fillna(kwargs["fillna"], inplace=True)
      if "fill_method" in kwargs:
          swma.fillna(method=kwargs["fill_method"], inplace=True)
  
      # Name & Category
      swma.name = f"SWMA_{length}"
      swma.category = "overlap"
  
      return swma
  
label_desc: Use image node_id 1 for calling a global function with example usage: swma(close, length, asc, offset) and returns: swma