code: def Si_list_to_dict(
      S_list,
      D: int,
      num_resamples: int,
      keep_resamples: bool,
      calc_second_order: bool,
  ):
      """Convert the parallel output into the regular dict format for
      printing/returning"""
      S = create_Si_dict(
          D, num_resamples, keep_resamples, calc_second_order
      )
      L = []
      for list in S_list:  # first reformat to flatten
          L += list
  
      for s in L:  # First order (+conf.)
          if s[2] is None:
              S[s[0]][s[1]] = s[3]
          else:
              S[s[0]][s[1], s[2]] = s[3]
  
      return S
  
imports: from types import MethodType
  from warnings import warn
  from scipy.stats import norm
  import numpy
  import pandas
  from .None import common_args
  from ..util import read_param_file, ResultDict, extract_group_names, _check_groups
  from multiprocessing import Pool, cpu_count
  from functools import partial
  from itertools import combinations, zip_longest
label_desc: Use image node_id 9 for calling a global function with example usage: Si_list_to_dict(S_list, D, num_resamples, keep_resamples, calc_second_order) and returns: S