code: def apply_repro_analysis(dataset, thresholds=[3.0], method="crfx"):
      """
      perform the reproducibility  analysis according to the
      """
      from nipy.labs.spatial_models.discrete_domain import (
          grid_domain_from_binary_array,
      )
  
      n_subj, dimx, dimy = dataset.shape
  
      func = np.reshape(dataset, (n_subj, dimx * dimy)).T
      var = np.ones((dimx * dimy, n_subj))
      domain = grid_domain_from_binary_array(np.ones((dimx, dimy, 1)))
  
      ngroups = 5
      sigma = 2.0
      csize = 10
      niter = 5
      verbose = 0
      swap = False
  
      kap, clt, pkd = [], [], []
      for threshold in thresholds:
          kappa, cls, pks = [], [], []
          kwargs = {"threshold": threshold, "csize": csize}
          for i in range(niter):
              k = voxel_reproducibility(
                  func,
                  var,
                  domain,
                  ngroups,
                  method,
                  swap,
                  verbose,
                  **kwargs,
              )
              kappa.append(k)
              cld = cluster_reproducibility(
                  func,
                  var,
                  domain,
                  ngroups,
                  sigma,
                  method,
                  swap,
                  verbose,
                  **kwargs,
              )
              cls.append(cld)
              pk = peak_reproducibility(
                  func,
                  var,
                  domain,
                  ngroups,
                  sigma,
                  method,
                  swap,
                  verbose,
                  **kwargs,
              )
              pks.append(pk)
  
          kap.append(np.array(kappa))
          clt.append(np.array(cls))
          pkd.append(np.array(pks))
      kap = np.array(kap)
      clt = np.array(clt)
      pkd = np.array(pkd)
      return kap, clt, pkd
  
file_path: nipy/nipy/labs/utils/tests/test_repro.py
imports: import numpy
  from ..reproducibility_measures import cluster_reproducibility, peak_reproducibility, voxel_reproducibility
  from ..simul_multisubject_fmri_dataset import surrogate_2d_dataset
label_desc: Use image node_id 2 for calling a global function with example usage: apply_repro_analysis(dataset, thresholds, method) and returns: kap,  clt,  pkd