code: def append_io_dim(cm, in_name, out_name, start=0, step=1):
      """Append input and output dimension to coordmap
  
      Parameters
      ----------
      cm : Affine
         Affine coordinate map instance to which to append dimension
      in_name : str
         Name for new input dimension
      out_name : str
         Name for new output dimension
      start : float, optional
         Offset for transformed values in new dimension
      step : float, optional
         Step, or scale factor for transformed values in new dimension
  
      Returns
      -------
      cm_plus : Affine
         New coordinate map with appended dimension
  
      Examples
      --------
      Typical use is creating a 4D coordinate map from a 3D
  
      >>> cm3d = AffineTransform.from_params('ijk', 'xyz', np.diag([1,2,3,1]))
      >>> cm4d = append_io_dim(cm3d, 'l', 't', 9, 5)
      >>> cm4d.affine
      array([[ 1.,  0.,  0.,  0.,  0.],
             [ 0.,  2.,  0.,  0.,  0.],
             [ 0.,  0.,  3.,  0.,  0.],
             [ 0.,  0.,  0.,  5.,  9.],
             [ 0.,  0.,  0.,  0.,  1.]])
      """
      extra_aff = np.array([[step, start], [0, 1]])
      extra_cmap = AffineTransform.from_params(
          [in_name], [out_name], extra_aff
      )
      return product(cm, extra_cmap)
  
imports: import warnings
  import numpy
  import numpy.linalg
  from nibabel import io_orientation
  from nibabel.affines import from_matvec, to_matvec
  from .coordinate_system import CoordinateSystem, is_coordsys, safe_dtype
  from .coordinate_system import product
label_desc: Use image node_id 17 for calling a global function with example usage: append_io_dim(cm, in_name, out_name, start, step) and returns: product