code: def _detect_compressor(fileobj):
      """Return the compressor matching fileobj.
  
      Parameters
      ----------
      fileobj: file object
  
      Returns
      -------
      str in {'zlib', 'gzip', 'bz2', 'lzma', 'xz', 'compat', 'not-compressed'}
      """
      # Read the magic number in the first bytes of the file.
      max_prefix_len = _get_prefixes_max_len()
      if hasattr(fileobj, "peek"):
          # Peek allows to read those bytes without moving the cursor in the
          # file whic.
          first_bytes = fileobj.peek(max_prefix_len)
      else:
          # Fallback to seek if the fileobject is not peekable.
          first_bytes = fileobj.read(max_prefix_len)
          fileobj.seek(0)
  
      if first_bytes.startswith(_ZFILE_PREFIX):
          return "compat"
      else:
          for name, compressor in _COMPRESSORS.items():
              if first_bytes.startswith(compressor.prefix):
                  return name
  
      return "not-compressed"
  
file_path: catboost/contrib/python/joblib/joblib/numpy_pickle_utils.py
imports: import pickle
  import io
  import sys
  import warnings
  import contextlib
  from .compressor import _ZFILE_PREFIX
  from .compressor import _COMPRESSORS
label_desc: Use image node_id 5 for calling a global function with example usage: _detect_compressor(fileobj) and returns: str, str, name