code: def test_read_slices():
      for _, d in slice_generator(DATA):
          assert d.shape == (20, 30)
      for _, d in slice_generator(DATA, axis=1):
          assert d.shape == (10, 30)
      for _, d in slice_generator(DATA, axis=2):
          assert d.shape == (10, 20)
  
file_path: nipy/nipy/core/utils/tests/test_generators.py
imports: import numpy
  import pytest
  from numpy.testing import assert_almost_equal, assert_array_equal
  from ...api import slice_generator, write_data
  from ..None import generators
label_desc: Use image node_id 1 for calling a global function with example usage: test_read_slices() without return types