code: def output_T(results, contrast, retvals=("effect", "sd", "t")):
      """Convenience function to collect t contrast results
  
      Parameters
      ----------
      results : object
          implementing Tcontrast method
      contrast : array
          contrast matrix
      retvals : sequence, optional
          None or more of strings 'effect', 'sd', 't', where the presence of the
          string means that that output will be returned.
  
      Returns
      -------
      res_list : list
          List of results.  It will have the same length as `retvals` and the
          elements will be in the same order as retvals
      """
      r = results.Tcontrast(contrast, store=retvals)
      returns = []
      for valname in retvals:
          if valname == "effect":
              returns.append(r.effect)
          if valname == "sd":
              returns.append(r.sd)
          if valname == "t":
              returns.append(r.t)
      return returns
  
file_path: nipy/nipy/modalities/fmri/fmristat/outputters.py
imports: import numpy
label_desc: Use image node_id 1 for calling a global function with example usage: output_T(results, contrast, retvals) and returns: returns