class_docstr: First pass through fmri_image.
  
  Parameters
  ----------
  fmri_image : `FmriImageList` or 4D image
     object returning 4D data from np.asarray, with first
     (``object[0]``) axis being the independent variable of the model;
     object[0] returns an object with attribute ``shape``.
  formula :  :class:`nipy.algorithms.statistics.formula.Formula`
  outputs : list
      Store for model outputs.
  volume_start_times: None or float or (N,) ndarray
      start time of each frame. It can be specified either as an ndarray
      with ``N=len(images)`` elements or as a single float, the TR. None
      results in ``np.arange(len(images)).astype(np.float64)``
  
  Raises
  ------
  ValueError
      If `volume_start_times` not specified, and 4D image passed.
code: def __init__(
      self, fmri_image, formula, outputs=None, volume_start_times=None
  ):
      self.fmri_image = fmri_image
      try:
          self.data = fmri_image.get_fdata()
      except AttributeError:
          self.data = fmri_image.get_list_data(axis=0)
      self.formula = formula
      self.outputs = outputs if outputs else []
      if volume_start_times is None:
          volume_start_times = getattr(
              fmri_image, "volume_start_times", None
          )
      if volume_start_times is None:
          raise ValueError(
              "Must specify start times for 4D image input"
          )
      self.volume_start_times = volume_start_times
  
imports: import copy
  from os import path
  import numpy
  import numpy.linalg
  from nipy.algorithms.statistics.formula import make_recarray
  from nipy.algorithms.statistics.models.regression import ARModel, OLSModel, ar_bias_correct, ar_bias_corrector
  from nipy.core.api import AffineTransform, Image, matrix_generator, parcels
  from nipy.io.api import save_image
  from ..api import FmriImageList, axis0_generator
  from .None import outputters
label_desc: Use image node_id 1 to create a new OLS object  with example: obj = OLS(fmri_image, formula, outputs, volume_start_times)