(S_list, D: int, num_resamples: int, keep_resamples:bool, calc_second_order: bool)
return S
Convert the parallel output into the regular dict format for
    printing/returning
Convert the parallel output into the regular dict format for
    printing/returning
Convert the parallel output into the regular dict format for printing / returning
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 l in S_list:  # first reformat to flatten
        L += l

    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
def Si_list_to_dict ( S_list , D : int , num_resamples : int , keep_resamples : bool , calc_second_order : bool ) : S = create_Si_dict ( D , num_resamples , keep_resamples , calc_second_order ) L = [ ] for l in S_list : # first reformat to flatten L += l 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