code: def results_table(path_dict):
      """Return precalculated results images for subject info in `path_dict`
  
      Parameters
      ----------
      path_dict : dict
          containing key 'rootdir'
  
      Returns
      -------
      rtab : dict
          dict with keys given by run directories for this subject, values being a
          list with filenames of effect and sd images.
      """
      # Which runs correspond to this design type?
      rootdir = path_dict["rootdir"]
      runs = filter(
          lambda f: isdir(pjoin(rootdir, f)),
          ["results_%02d" % i for i in range(1, 5)],
      )
  
      # Find out which contrasts have t-statistics,
      # storing the filenames for reading below
  
      results = {}
  
      for rundir in runs:
          rundir = pjoin(rootdir, rundir)
          for condir in listdir(rundir):
              for stat in ["sd", "effect"]:
                  fname_effect = abspath(
                      pjoin(rundir, condir, "effect.nii")
                  )
                  fname_sd = abspath(pjoin(rundir, condir, "sd.nii"))
              if exists(fname_effect) and exists(fname_sd):
                  results.setdefault(condir, []).append(
                      [fname_effect, fname_sd]
                  )
      return results
  
imports: import csv
  import os
  from io import StringIO
  from os import listdir, makedirs
  from os.path import abspath, exists, isdir, splitext
  from os.path import join
  import numpy
  import pandas
  from nipy.io.api import load_image
label_desc: Use image node_id 7 for calling a global function with example usage: results_table(path_dict) and returns: results