code: def _hash_scalar(val, encoding="utf8", hash_key=None):
      """
      Hash scalar value
  
      Returns
      -------
      1d uint64 numpy array of hash value, of length 1
      """
  
      if isna(val):
          # this is to be consistent with the _hash_categorical implementation
          return np.array([np.iinfo(np.uint64).max], dtype="u8")
  
      if getattr(val, "tzinfo", None) is not None:
          # for tz-aware datetimes, we need the underlying naive UTC value and
          # not the tz aware object or pd extension type (as
          # infer_dtype_from_scalar would do)
          if not isinstance(val, tslibs.Timestamp):
              val = tslibs.Timestamp(val)
          val = val.tz_convert(None)
  
      dtype, val = infer_dtype_from_scalar(val)
      vals = np.array([val], dtype=dtype)
  
      return hash_array(
          vals, hash_key=hash_key, encoding=encoding, categorize=False
      )
  
file_path: catboost/contrib/python/pandas/py2/pandas/core/util/hashing.py
imports: import itertools
  import numpy
  from pandas._libs import hashing, tslibs
  from pandas.core.dtypes.cast import infer_dtype_from_scalar
  from pandas.core.dtypes.common import is_categorical_dtype, is_extension_array_dtype, is_list_like
  from pandas.core.dtypes.generic import ABCDataFrame, ABCIndexClass, ABCMultiIndex, ABCSeries
  from pandas.core.dtypes.missing import isna
label_desc: Use image node_id 7 for calling a global function with example usage: _hash_scalar(val, encoding, hash_key) and returns: hash_array, np