code: def is_hashable(obj) -> bool:
      """
      Return True if hash(obj) will succeed, False otherwise.
  
      Some types will pass a test against collections.abc.Hashable but fail when
      they are actually hashed with hash().
  
      Distinguish between these and other types by trying the call to hash() and
      seeing if they raise TypeError.
  
      Returns
      -------
      bool
  
      Examples
      --------
      >>> import collections
      >>> from pandas.api.types import is_hashable
      >>> a = ([],)
      >>> isinstance(a, collections.abc.Hashable)
      True
      >>> is_hashable(a)
      False
      """
      # Unfortunately, we can't use isinstance(obj, collections.abc.Hashable),
      # which can be faster than calling hash. That is because numpy scalars
      # fail this test.
  
      # Reconsider this decision once this numpy bug is fixed:
      # https://github.com/numpy/numpy/issues/5562
  
      try:
          hash(obj)
      except TypeError:
          return False
      else:
          return True
  
file_path: catboost/contrib/python/pandas/py3/pandas/core/dtypes/inference.py
imports: from __future__ import annotations
  from collections import abc
  from numbers import Number
  import re
  from typing import Pattern
  import numpy
  from pandas._libs import lib
label_desc: Use image node_id 10 for calling a global function with example usage: is_hashable(obj) and returns: True, False