code: def is_xyz_affable(coordmap, name2xyz=None):
      """Return True if the coordap has an xyz affine
  
      Parameters
      ----------
      coordmap : ``CoordinateMap`` instance
          Coordinate map to test
      name2xyz : None or mapping, optional
          Object such that ``name2xyz[ax_name]`` returns 'x', or 'y' or 'z' or
          raises a KeyError for a str ``ax_name``.  None means use module default.
  
      Returns
      -------
      tf : bool
          True if `coordmap` has an xyz affine, False otherwise
  
      Examples
      --------
      >>> cmap = vox2mni(np.diag([2,3,4,5,1]))
      >>> cmap
      AffineTransform(
         function_domain=CoordinateSystem(coord_names=('i', 'j', 'k', 'l'), name='voxels', coord_dtype=float64),
         function_range=CoordinateSystem(coord_names=('mni-x=L->R', 'mni-y=P->A', 'mni-z=I->S', 't'), name='mni', coord_dtype=float64),
         affine=array([[ 2.,  0.,  0.,  0.,  0.],
                       [ 0.,  3.,  0.,  0.,  0.],
                       [ 0.,  0.,  4.,  0.,  0.],
                       [ 0.,  0.,  0.,  5.,  0.],
                       [ 0.,  0.,  0.,  0.,  1.]])
      )
      >>> is_xyz_affable(cmap)
      True
      >>> time0_cmap = cmap.reordered_domain([3,0,1,2])
      >>> time0_cmap
      AffineTransform(
         function_domain=CoordinateSystem(coord_names=('l', 'i', 'j', 'k'), name='voxels', coord_dtype=float64),
         function_range=CoordinateSystem(coord_names=('mni-x=L->R', 'mni-y=P->A', 'mni-z=I->S', 't'), name='mni', coord_dtype=float64),
         affine=array([[ 0.,  2.,  0.,  0.,  0.],
                       [ 0.,  0.,  3.,  0.,  0.],
                       [ 0.,  0.,  0.,  4.,  0.],
                       [ 5.,  0.,  0.,  0.,  0.],
                       [ 0.,  0.,  0.,  0.,  1.]])
      )
      >>> is_xyz_affable(time0_cmap)
      False
      """
      try:
          xyz_affine(coordmap, name2xyz)
      except SpaceError:
          return False
      return True
  
imports: import numpy
  from nibabel import io_orientation
  from nibabel.affines import from_matvec
  from .coordinate_map import CoordMapMaker
  from .coordinate_system import CoordSysMaker, is_coordsys, is_coordsys_maker
label_desc: Use image node_id 6 for calling a global function with example usage: is_xyz_affable(coordmap, name2xyz) and returns: True, False