code: def dema(close, length=None, talib=None, offset=None, **kwargs):
      """Indicator: Double Exponential Moving Average (DEMA)"""
      # Validate Arguments
      length = int(length) if length and length > 0 else 10
      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 DEMA
  
          dema = DEMA(close, length)
      else:
          ema1 = ema(close=close, length=length)
          ema2 = ema(close=ema1, length=length)
          dema = 2 * ema1 - ema2
  
      # Offset
      if offset != 0:
          dema = dema.shift(offset)
  
      # Handle fills
      if "fillna" in kwargs:
          dema.fillna(kwargs["fillna"], inplace=True)
      if "fill_method" in kwargs:
          dema.fillna(method=kwargs["fill_method"], inplace=True)
  
      # Name & Category
      dema.name = f"DEMA_{length}"
      dema.category = "overlap"
  
      return dema
  
label_desc: Use image node_id 1 for calling a global function with example usage: dema(close, length, talib, offset) and returns: dema