code: def test_iter():
      img = load_image(funcfile)
      img_shape = img.shape
      exp_shape = (img_shape[0],) + img_shape[2:]
      j = 0
      for i, d in axis0_generator(img.get_fdata()):
          j += 1
          assert d.shape == exp_shape
          del i
          gc.collect()
      assert j == img_shape[1]
  
file_path: nipy/nipy/modalities/fmri/tests/test_fmri.py
imports: import gc
  import numpy
  import pytest
  from nipy.core.api import AffineTransform
  from nipy.core.api import Image, parcels
  from nipy.io.api import load_image, save_image
  from nipy.modalities.fmri.api import FmriImageList, axis0_generator
  from nipy.testing import funcfile
label_desc: Use image node_id 2 for calling a global function with example usage: test_iter() without return types