code: def test_different_read_modes_with_readers(examples):
      dname1, dname2, fname1, fname2 = examples
  
      for fname, dname, n in [(fname1, dname1, 1), (fname2, dname2, 2)]:
          # Test imread()
          R = iio.read(fname, "DICOM", "i")
          assert len(R) == 1
          assert isinstance(R.get_meta_data(), dict)
          assert isinstance(R.get_meta_data(0), dict)
  
          # Test mimread()
          R = iio.read(fname, "DICOM", "I")
          if n == 1:
              assert len(R) > 10
          else:
              assert len(R) == 20 + 25
          assert isinstance(R.get_meta_data(), dict)
          assert isinstance(R.get_meta_data(0), dict)
  
          # Test volread()
          R = iio.read(fname, "DICOM", "v")
          assert len(R) == n  # we ask for one, but get an honest number
          assert isinstance(R.get_meta_data(), dict)
          assert isinstance(R.get_meta_data(0), dict)
  
          # Test mvolread()
          R = iio.read(fname, "DICOM", "V")
          assert len(R) == n
          assert isinstance(R.get_meta_data(), dict)
          assert isinstance(R.get_meta_data(0), dict)
  
          # Touch DicomSeries objects
          assert repr(R._series[0])
          assert R._series[0].description
          assert len(R._series[0].sampling) == 3
  
          R = iio.read(fname, "DICOM", "?")
          with pytest.raises(RuntimeError):
              R.get_length()
  
file_path: imageio/tests/test_dicom.py
imports: from zipfile import ZipFile
  import numpy
  import pytest
  import imageio.v2
  import imageio.v3
  from imageio import core
  import imageio.plugins.dicom
  from conftest import deprecated_test
label_desc: Use image node_id 7 for calling a global function with example usage: test_different_read_modes_with_readers(examples) without return types