code: def output_T(
      outbase,
      contrast,
      fmri_image,
      effect=True,
      sd=True,
      t=True,
      clobber=False,
  ):
      """Return t contrast regression outputs list for `contrast`
  
      Parameters
      ----------
      outbase : string
          Base filename that will be used to construct a set of files
          for the TContrast.  For example, outbase='output.nii' will
          result in the following files (assuming defaults for all other
          params): output_effect.nii, output_sd.nii, output_t.nii
      contrast : array
          F contrast matrix
      fmri_image : ``FmriImageList`` or ``Image``
          object such that ``object[0]`` has attributes ``shape`` and
          ``coordmap``
      effect : {True, False}, optional
          whether to write an effect image
      sd : {True, False}, optional
          whether to write a standard deviation image
      t : {True, False}, optional
          whether to write a t image
      clobber : {False, True}, optional
          whether to overwrite images that exist.
  
      Returns
      -------
      reglist : ``RegressionOutputList`` instance
          Regression output list with selected outputs, where selection is by
          inputs `effect`, `sd` and `t`
  
      Notes
      -----
      Note that this routine uses the corresponding ``output_T`` routine in
      :mod:`outputters`, but indirectly via the TOutput object.
      """
  
      def build_filename(label):
          index = outbase.find(".")
          return "".join([outbase[:index], "_", label, outbase[index:]])
  
      if effect:
          effectim = ModelOutputImage(
              build_filename("effect"),
              fmri_image[0].coordmap,
              fmri_image[0].shape,
              clobber=clobber,
          )
      else:
          effectim = None
      if sd:
          sdim = ModelOutputImage(
              build_filename("sd"),
              fmri_image[0].coordmap,
              fmri_image[0].shape,
              clobber=clobber,
          )
      else:
          sdim = None
      if t:
          tim = ModelOutputImage(
              build_filename("t"),
              fmri_image[0].coordmap,
              fmri_image[0].shape,
              clobber=clobber,
          )
      else:
          tim = None
      return outputters.TOutput(
          contrast, effect=effectim, sd=sdim, t=tim
      )
  
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 4 for calling a global function with example usage: output_T(outbase, contrast, fmri_image, effect, sd, t, clobber) and returns: outputters, str