code: def rollimg(img, axis, start=0, fix0=True):
      """Roll `axis` backwards in the inputs, until it lies before `start`
  
      Parameters
      ----------
      img : Image
          Image whose axes and reference coordinates are to be reordered by
          rollimg.
      axis : str or int
          Axis to be rolled, can be specified by name or as an integer.  If an
          integer, axis is an input axis.  If a name, can be name of input or
          output axis.  If an output axis, we search for the closest matching
          input axis, and raise an AxisError if this fails.
      start : str or int, optional
          position before which to roll axis `axis`.  Default to 0.  Can again be
          an integer (input axis) or name of input or output axis.
      fix0 : bool, optional
          Whether to allow for zero scaling when searching for an input axis
          matching an output axis.  Useful for images where time scaling is 0.
  
      Returns
      -------
      newimg : Image
         Image with reordered input axes and corresponding data.
  
      Examples
      --------
      >>> data = np.zeros((30,40,50,5))
      >>> affine_transform = AffineTransform('ijkl', 'xyzt', np.diag([1,2,3,4,1]))
      >>> im = Image(data, affine_transform)
      >>> im.coordmap
      AffineTransform(
         function_domain=CoordinateSystem(coord_names=('i', 'j', 'k', 'l'), name='', coord_dtype=float64),
         function_range=CoordinateSystem(coord_names=('x', 'y', 'z', 't'), name='', coord_dtype=float64),
         affine=array([[ 1.,  0.,  0.,  0.,  0.],
                       [ 0.,  2.,  0.,  0.,  0.],
                       [ 0.,  0.,  3.,  0.,  0.],
                       [ 0.,  0.,  0.,  4.,  0.],
                       [ 0.,  0.,  0.,  0.,  1.]])
      )
      >>> im_t_first = rollimg(im, 't')
      >>> im_t_first.shape
      (5, 30, 40, 50)
      >>> im_t_first.coordmap
      AffineTransform(
         function_domain=CoordinateSystem(coord_names=('l', 'i', 'j', 'k'), name='', coord_dtype=float64),
         function_range=CoordinateSystem(coord_names=('x', 'y', 'z', 't'), name='', coord_dtype=float64),
         affine=array([[ 0.,  1.,  0.,  0.,  0.],
                       [ 0.,  0.,  2.,  0.,  0.],
                       [ 0.,  0.,  0.,  3.,  0.],
                       [ 4.,  0.,  0.,  0.,  0.],
                       [ 0.,  0.,  0.,  0.,  1.]])
      )
      """
      axis = input_axis_index(img.coordmap, axis, fix0)
      start = input_axis_index(img.coordmap, start, fix0)
      order = list(range(img.ndim))
      order.remove(axis)
      if axis < start:
          start -= 1
      order.insert(start, axis)
      return img.reordered_axes(order)
  
imports: import warnings
  from copy import copy
  from itertools import chain
  import numpy
  from nibabel.onetime import auto_attr
  from ..reference.array_coords import ArrayCoordMap
  from ..reference.coordinate_map import AffineTransform, CoordinateSystem, input_axis_index
label_desc: Use image node_id 4 for calling a global function with example usage: rollimg(img, axis, start, fix0) and returns: img