code: def test_il_init():
      images = list(iter_axis(FIMG, "t"))
      imglst = ImageList(images)
      assert len(imglst) == 20
      element = imglst[1]
      assert element.shape == (17, 21, 3)
      assert element.coordmap == FIMG[..., 1].coordmap
      # Test bad construction
      bad_images = images + [np.zeros((17, 21, 3))]
      pytest.raises(ValueError, ImageList, bad_images)
      a = np.arange(10)
      pytest.raises(ValueError, ImageList, a)
      # Test empty ImageList
      emplst = ImageList()
      assert len(emplst.list) == 0
  
file_path: nipy/nipy/core/image/tests/test_image_list.py
imports: import numpy
  import pytest
  from ....core.reference.coordinate_map import AffineTransform, AxisError, CoordinateSystem
  from ....io.api import load_image
  from ....testing import assert_almost_equal, funcfile
  from ..image import Image
  from ..image_list import ImageList, iter_axis
label_desc: Use image node_id 1 for calling a global function with example usage: test_il_init() without return types