code: def test_iter():
      for img_slice in image.iter_axis(gimg, 0):
          assert img_slice.shape == (3, 2)
      tmp = np.zeros(gimg.shape)
      write_data(tmp, enumerate(iter_axis(gimg, 0, asarray=True)))
      assert_array_almost_equal(tmp, gimg.get_fdata())
      tmp = np.zeros(gimg.shape)
      g = iter_axis(gimg, 0, asarray=True)
      write_data(tmp, enumerate(g))
      assert_array_almost_equal(tmp, gimg.get_fdata())
  
imports: import warnings
  from itertools import chain
  import nibabel
  import numpy
  import pytest
  from numpy.testing import assert_almost_equal, assert_array_almost_equal, assert_array_equal
  from ...api import data_generator, parcels, write_data
  from ...reference.coordinate_map import AffineTransform, AxisError
  from ...reference.coordinate_system import CoordinateSystem
  from ..None import image
  from ..image import Image, is_image, iter_axis, rollimg
label_desc: Use image node_id 10 for calling a global function with example usage: test_iter() without return types