code: def make_fiac_contrasts(p):
      """Specify some contrasts for the FIAC experiment
  
      Parameters
      ==========
      p: int, the number of columns of the design matrix (for all sessions)
      """
      con = {}
      # the design matrices of both runs comprise 13 columns
      # the first 5 columns of the design matrices correspond to the following
      # conditions: ["SSt-SSp", "SSt-DSp", "DSt-SSp", "DSt-DSp", "FirstSt"]
  
      def length_p_vector(con, p):
          return np.hstack((con, np.zeros(p - len(con))))
  
      con["SStSSp_minus_DStDSp"] = length_p_vector([1, 0, 0, -1], p)
      con["DStDSp_minus_SStSSp"] = length_p_vector([-1, 0, 0, 1], p)
      con["DSt_minus_SSt"] = length_p_vector([-1, -1, 1, 1], p)
      con["DSp_minus_SSp"] = length_p_vector([-1, 1, -1, 1], p)
      con["DSt_minus_SSt_for_DSp"] = length_p_vector([0, -1, 0, 1], p)
      con["DSp_minus_SSp_for_DSt"] = length_p_vector([0, 0, -1, 1], p)
      con["Deactivation"] = length_p_vector([-1, -1, -1, -1, 4], p)
      con["Effects_of_interest"] = np.eye(p)[:5]
      return con
  
imports: from os import getcwd, mkdir, path
  import numpy
  from nibabel import save
  from nipy.labs.viz import cm, plot_map
  from nipy.modalities.fmri.glm import FMRILinearModel
  from nipy.utils import example_data
label_desc: Use image node_id 1 for calling a global function with example usage: make_fiac_contrasts(p) and returns: con, np