code: def test_compression_filesystems(
      compression_fs_class,
      gz_file,
      bz2_file,
      lz4_file,
      zstd_file,
      xz_file,
      text_file,
  ):
      input_paths = {
          "gzip": gz_file,
          "xz": xz_file,
          "zstd": zstd_file,
          "bz2": bz2_file,
          "lz4": lz4_file,
      }
      input_path = input_paths[compression_fs_class.protocol]
      if input_path is None:
          reason = f"for '{compression_fs_class.protocol}' compression protocol, "
          if compression_fs_class.protocol == "lz4":
              reason += require_lz4.kwargs["reason"]
          elif compression_fs_class.protocol == "zstd":
              reason += require_zstandard.kwargs["reason"]
          pytest.skip(reason)
      fs = fsspec.filesystem(
          compression_fs_class.protocol, fo=input_path
      )
      assert isinstance(fs, compression_fs_class)
      expected_filename = os.path.basename(input_path)
      expected_filename = expected_filename[
          : expected_filename.rindex(".")
      ]
      assert fs.glob("*") == [expected_filename]
      with fs.open(expected_filename, "r", encoding="utf-8") as f, open(
          text_file, encoding="utf-8"
      ) as expected_file:
          assert f.read() == expected_file.read()
  
file_path: datasets/tests/test_filesystem.py
imports: import importlib
  import os
  import fsspec
  import pytest
  from fsspec import register_implementation
  from fsspec.registry import _registry
  from datasets.filesystems import COMPRESSION_FILESYSTEMS, extract_path_from_uri, is_remote_filesystem
  from .utils import require_lz4, require_zstandard
label_desc: Use image node_id 5 for calling a global function with example usage: test_compression_filesystems(compression_fs_class, gz_file, bz2_file, lz4_file, zstd_file, xz_file, text_file) without return types