code: def what(file, h=None):
      f = None
      try:
          if h is None:
              if isinstance(file, (str, PathLike)):
                  f = open(file, "rb")
                  h = f.read(32)
              else:
                  location = file.tell()
                  h = file.read(32)
                  file.seek(location)
          for tf in tests:
              res = tf(h, f)
              if res:
                  return res
      finally:
          if f:
              f.close()
      return None
  
file_path: catboost/contrib/tools/python3/src/Lib/imghdr.py
imports: from os import PathLike
  import warnings
label_desc: Use image node_id 1 for calling a global function with example usage: what(file, h) and returns: None, res