code: def sobol_parallel(Z, A, AB, BA, B, r, tasks):
      sobol_indices = []
      for d, j, k in tasks:
          if d == "S1":
              s = first_order(A, AB[:, j], B)
          elif d == "S1_conf":
              s = Z * first_order(A[r], AB[r, j], B[r]).std(ddof=1)
          elif d == "ST":
              s = total_order(A, AB[:, j], B)
          elif d == "ST_conf":
              s = Z * total_order(A[r], AB[r, j], B[r]).std(ddof=1)
          elif d == "S2":
              s = second_order(A, AB[:, j], AB[:, k], BA[:, j], B)
          elif d == "S2_conf":
              s = Z * second_order(
                  A[r], AB[r, j], AB[r, k], BA[r, j], B[r]
              ).std(ddof=1)
          sobol_indices.append([d, j, k, s])
  
      return sobol_indices
  
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 7 for calling a global function with example usage: sobol_parallel(Z, A, AB, BA, B, r, tasks) and returns: sobol_indices