code: def test_multiple_ndimages(tmp_path):
      # regression test for
      # https://github.com/imageio/imageio/issues/81
  
      filename = tmp_path / "nightmare.tiff"
      volumetric = np.full((4, 255, 255, 3), 114, dtype=np.uint8)
      flat = np.full((255, 255, 3), 114, dtype=np.uint8)
      different_shape = np.full((120, 73, 3), 114, dtype=np.uint8)
      with iio.imopen(filename, "w") as file:
          file.write(volumetric)
          file.write(flat)
          file.write(different_shape)
  
      # imread will read the respective series when using series kwarg
      assert iio.imread(filename, index=0).shape == (4, 255, 255, 3)
      assert iio.imread(filename, index=1).shape == (255, 255, 3)
      assert iio.imread(filename, index=2).shape == (120, 73, 3)
  
      # imread will read the respective plane when using index kwarg
      assert iio.imread(filename, index=..., page=0).shape == (
          255,
          255,
          3,
      )
      assert iio.imread(filename, index=..., page=1).shape == (
          255,
          255,
          3,
      )
      assert iio.imread(filename, index=..., page=2).shape == (
          255,
          255,
          3,
      )
      assert iio.imread(filename, index=..., page=3).shape == (
          255,
          255,
          3,
      )
      assert iio.imread(filename, index=..., page=4).shape == (
          255,
          255,
          3,
      )
      assert iio.imread(filename, index=..., page=5).shape == (
          120,
          73,
          3,
      )
  
      # imiter will yield the three images in order
      shapes = [(4, 255, 255, 3), (255, 255, 3), (120, 73, 3)]
      for image, shape in zip(iio.imiter(filename), shapes):
          assert image.shape == shape
  
      # iter pages will yield pages in order
      shapes = [
          (255, 255, 3),
          (255, 255, 3),
          (255, 255, 3),
          (255, 255, 3),
          (255, 255, 3),
          (120, 73, 3),
      ]
      with iio.imopen(filename, "r") as file:
          for image, shape in zip(file.iter_pages(), shapes):
              assert image.shape == shape
  
imports: import datetime
  import numpy
  import pytest
  import io
  from copy import deepcopy
  import struct
  import imageio.v3
  from imageio.config import known_plugins, known_extensions
label_desc: Use image node_id 19 for calling a global function with example usage: test_multiple_ndimages(tmp_path) without return types