code: def cti(close, length=None, offset=None, **kwargs) -> Series:
      """Indicator: Correlation Trend Indicator"""
      length = int(length) if length and length > 0 else 12
      close = verify_series(close, length)
      offset = get_offset(offset)
  
      if close is None:
          return
  
      cti = linreg(close, length=length, r=True)
  
      # Offset
      if offset != 0:
          cti = cti.shift(offset)
  
      # Handle fills
      if "fillna" in kwargs:
          cti.fillna(method=kwargs["fillna"], inplace=True)
      if "fill_method" in kwargs:
          cti.fillna(method=kwargs["fill_method"], inplace=True)
  
      cti.name = f"CTI_{length}"
      cti.category = "momentum"
      return cti
  
label_desc: Use image node_id 1 for calling a global function with example usage: cti(close, length, offset) and returns: cti