code: def psl(
      close,
      open_=None,
      length=None,
      scalar=None,
      drift=None,
      offset=None,
      **kwargs,
  ):
      """Indicator: Psychological Line (PSL)"""
      # Validate Arguments
      length = int(length) if length and length > 0 else 12
      scalar = float(scalar) if scalar and scalar > 0 else 100
      close = verify_series(close, length)
      drift = get_drift(drift)
      offset = get_offset(offset)
  
      if close is None:
          return
  
      # Calculate Result
      if open_ is not None:
          open_ = verify_series(open_)
          diff = npSign(close - open_)
      else:
          diff = npSign(close.diff(drift))
  
      diff.fillna(0, inplace=True)
      diff[diff <= 0] = 0  # Zero negative values
  
      psl = scalar * diff.rolling(length).sum()
      psl /= length
  
      # Offset
      if offset != 0:
          psl = psl.shift(offset)
  
      # Handle fills
      if "fillna" in kwargs:
          psl.fillna(kwargs["fillna"], inplace=True)
      if "fill_method" in kwargs:
          psl.fillna(method=kwargs["fill_method"], inplace=True)
  
      # Name and Categorize it
      _props = f"_{length}"
      psl.name = f"PSL{_props}"
      psl.category = "momentum"
  
      return psl
  
label_desc: Use image node_id 1 for calling a global function with example usage: psl(close, open_, length, scalar, drift, offset) and returns: psl