code: def test_known_space():
      # Known space utility routine
      for sp in known_spaces:
          cs = sp.to_coordsys_maker()(3)
          assert known_space(cs) == sp
      cs = CS("xyz")
      assert known_space(cs) == None
      sp0 = XYZSpace("hijo")
      sp1 = XYZSpace("hija")
      custom_spaces = (sp0, sp1)
      for sp in custom_spaces:
          cs = sp.to_coordsys_maker()(3)
          assert known_space(cs, custom_spaces) == sp
  
file_path: nipy/nipy/core/reference/tests/test_spaces.py
imports: import numpy
  import pytest
  from nibabel.affines import from_matvec
  from numpy.testing import assert_array_equal
  from ...image.image import Image
  from ..coordinate_map import AffineTransform, CoordinateMap
  from ..coordinate_system import CoordinateSystem
  from ..coordinate_system import CoordSysMakerError
  from ..spaces import AffineError, AxesError, SpaceError, SpaceTypeError, XYZSpace, get_world_cs, is_xyz_affable, is_xyz_space, known_space, known_spaces, mni_csm, mni_space, vox2aligned, vox2mni, vox2scanner, vox2talairach, vox2unknown, xyz_affine, xyz_order
label_desc: Use image node_id 4 for calling a global function with example usage: test_known_space() without return types