code: def map_reproducibility(
      data,
      vardata,
      domain,
      ngroups,
      method="crfx",
      swap=False,
      verbose=0,
      **kwargs,
  ):
      """Return a reproducibility map for the given method
  
      Parameters
      ----------
      data: array of shape (nvox,nsubj)
            the input data from which everything is computed
      vardata: array of the same size
               the corresponding variance information
      domain: referential- and domain-defining image
      ngroups (int): the size of each subrgoup to be studied
      threshold (float): binarization threshold
                (makes sense only if method==rfx)
      method='crfx', string to be chosen among 'crfx', 'cmfx', 'cffx'
             inference method under study
      verbose=0 : verbosity mode
  
      Returns
      -------
      rmap: array of shape(nvox)
            the reproducibility map
      """
      nsubj = data.shape[1]
      nvox = data.shape[0]
      samples = draw_samples(nsubj, ngroups)
      rmap = np.zeros(nvox)
  
      for i in range(ngroups):
          x = data[:, samples[i]]
  
          if swap:
              # randomly swap the sign of x
              x *= 2 * (np.random.rand(len(samples[i])) > 0.5) - 1
  
          if method != "crfx":
              vx = vardata[:, samples[i]]
          csize = kwargs["csize"]
          threshold = kwargs["threshold"]
  
          # compute the statistical maps according to the method you like
          if method == "crfx":
              stat_map = ttest(x)
          elif method == "cffx":
              stat_map = fttest(x, vx)
          elif method == "cmfx":
              stat_map = mfx_ttest(x, vx)
          elif method == "cjt":
              # if kwargs.has_key('k'):
              if "k" in kwargs:
                  k = kwargs["k"]
              else:
                  k = nsubj / 2
              stat_map = conjunction(x, vx, k)
          else:
              raise ValueError("unknown method")
  
          # add the binarized map to a reproducibility map
          rmap += (
              cluster_threshold(stat_map, domain, threshold, csize) > 0
          )
  
      return rmap
  
imports: import numpy
  from nipy.io.nibcompat import get_affine
  from nipy.labs.spatial_models.discrete_domain import grid_domain_from_binary_array
label_desc: Use image node_id 15 for calling a global function with example usage: map_reproducibility(data, vardata, domain, ngroups, method, swap, verbose) and returns: rmap