code: def test_compressed(self):
      # we can read minc compressed
      # Not so for MINC2; hence this small sub-class
      for tp in self.test_files:
          content = open(tp["fname"], "rb").read()
          openers_exts = [(gzip.open, ".gz"), (bz2.BZ2File, ".bz2")]
          if HAVE_ZSTD:  # add .zst to test if installed
              openers_exts += [(pyzstd.ZstdFile, ".zst")]
          with InTemporaryDirectory():
              for opener, ext in openers_exts:
                  fname = "test.mnc" + ext
                  fobj = opener(fname, "wb")
                  fobj.write(content)
                  fobj.close()
                  img = self.module.load(fname)
                  data = img.get_fdata()
                  assert_data_similar(data, tp)
                  del img
  
imports: import bz2
  import gzip
  import types
  import warnings
  from io import BytesIO
  from os.path import join
  import numpy
  import pytest
  from numpy.testing import assert_array_equal
  from ..None import Nifti1Image, load, minc1
  from ..deprecated import ModuleProxy
  from ..deprecator import ExpiredDeprecationError
  from ..externals.netcdf import netcdf_file
  from ..minc1 import Minc1File, Minc1Image, MincHeader
  from ..optpkg import optional_package
  from ..testing import assert_data_similar, clear_and_catch_warnings, data_path
  from ..tmpdirs import InTemporaryDirectory
  from .None import test_spatialimages
  from .test_fileslice import slicer_samples
label_desc: Use image node_id 1 for calling the TestMinc1File obj's underlying member method code with example usage: obj.test_compressed() without return types