code: def test_fits_reading(test_images):
      """Test reading fits"""
  
      simple = test_images / "simple.fits"
      multi = test_images / "multi.fits"
      compressed = test_images / "compressed.fits.fz"
  
      # One image
      im = iio.imread(simple, format="fits")
      ims = iio.mimread(simple, format="fits")
      assert (im == ims[0]).all()
      assert len(ims) == 1
  
      # Multiple images
      ims = iio.mimread(multi, format="fits")
      assert len(ims) == 3
  
      R = iio.read(multi, format="fits")
      assert R.format.name == "FITS"
      ims = list(R)  # == [im for im in R]
      assert len(ims) == 3
  
      # Fail
      raises = pytest.raises
      raises(IndexError, R.get_data, -1)
      raises(IndexError, R.get_data, 3)
      raises(
          RuntimeError, R.get_meta_data, None
      )  # no meta data support
      raises(RuntimeError, R.get_meta_data, 0)  # no meta data support
  
      # Compressed image
      im = iio.imread(compressed, format="fits")
      assert im.shape == (2042, 3054)
  
file_path: imageio/tests/test_fits.py
imports: import pytest
  import imageio.v2
  from imageio.core import Request
  import numpy
  from conftest import deprecated_test
label_desc: Use image node_id 5 for calling a global function with example usage: test_fits_reading(test_images) without return types