code: def roc(
      close, length=None, scalar=None, talib=None, offset=None, **kwargs
  ):
      """Indicator: Rate of Change (ROC)"""
      # Validate Arguments
      length = int(length) if length and length > 0 else 10
      scalar = float(scalar) if scalar and scalar > 0 else 100
      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 ROC
  
          roc = ROC(close, length)
      else:
          roc = (
              scalar
              * mom(close=close, length=length)
              / close.shift(length)
          )
  
      # Offset
      if offset != 0:
          roc = roc.shift(offset)
  
      # Handle fills
      if "fillna" in kwargs:
          roc.fillna(kwargs["fillna"], inplace=True)
      if "fill_method" in kwargs:
          roc.fillna(method=kwargs["fill_method"], inplace=True)
  
      # Name and Categorize it
      roc.name = f"ROC_{length}"
      roc.category = "momentum"
  
      return roc
  
label_desc: Use image node_id 1 for calling a global function with example usage: roc(close, length, scalar, talib, offset) and returns: roc