code: def test_get_world_cs():
      # Utility to get world from a variety of inputs
      assert get_world_cs("mni") == mni_csm(3)
      mnit = mni_space.to_coordsys_maker("t")(4)
      assert get_world_cs(mni_space, 4) == mnit
      assert get_world_cs(mni_csm, 4) == mni_csm(4)
      assert get_world_cs(CS("xyz")) == CS("xyz")
      hija = XYZSpace("hija")
      maker = hija.to_coordsys_maker("qrs")
      assert get_world_cs(
          "hija", ndim=5, extras="qrs", spaces=[hija]
      ) == maker(5)
      pytest.raises(SpaceError, get_world_cs, "hijo")
      pytest.raises(SpaceError, get_world_cs, "hijo", spaces=[hija])
      pytest.raises(ValueError, get_world_cs, 0)
  
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 7 for calling a global function with example usage: test_get_world_cs() without return types