code: def decompress_file(
      path: FilePath | BaseBuffer, compression: CompressionOptions
  ) -> Generator[IO[bytes], None, None]:
      """
      Open a compressed file and return a file object.
  
      Parameters
      ----------
      path : str
          The path where the file is read from.
  
      compression : {'gzip', 'bz2', 'zip', 'xz', 'zstd', None}
          Name of the decompression to use
  
      Returns
      -------
      file object
      """
      with get_handle(
          path, "rb", compression=compression, is_text=False
      ) as handle:
          yield handle.handle
  
file_path: pandas/pandas/_testing/contexts.py
imports: from __future__ import annotations
  from contextlib import contextmanager
  import os
  from pathlib import Path
  import tempfile
  from typing import IO, TYPE_CHECKING, Any
  import uuid
  from pandas._config import using_copy_on_write
  from pandas.compat import PYPY
  from pandas.errors import ChainedAssignmentError
  from pandas import set_option
  from pandas.io.common import get_handle
label_desc: Use image node_id 1 for calling a global function with example usage: decompress_file(path, compression) without return types