code: def test_twosample(self):
      data, vardata, XYZ = make_data(n=20)
      data1, vardata1, data2, vardata2 = (
          data[:10],
          vardata[:10],
          data[10:],
          vardata[10:],
      )
      # rfx calibration
      P = pt.permutation_test_twosample(
          data1, data2, XYZ, ndraws=ndraws
      )
      c = [
          (P.random_Tvalues[int(P.ndraws * 0.95)], None),
          (P.random_Tvalues[int(P.ndraws * 0.5)], 10),
      ]
      r = [np.zeros(data.shape[1])]
      # Assuming our data.shape[1] is divisible by 2
      r[data.shape[1] // 2 :] *= 10
      # mfx calibration
      P = pt.permutation_test_twosample(
          data1,
          data2,
          XYZ,
          vardata1=vardata1,
          vardata2=vardata2,
          stat_id="student_mfx",
          ndraws=ndraws,
      )
      p_values, cluster_results, region_results = P.calibrate(
          nperms=nperms, clusters=c, regions=r
      )
  
file_path: nipy/nipy/labs/group/tests/test_permutation_test.py
imports: import unittest
  import numpy
  from numpy.testing import assert_array_equal
  from nipy.algorithms.graph import wgraph_from_3d_grid
  from ..None import permutation_test
label_desc: Use image node_id 3 for calling the test_permutation_test obj's underlying member method code with example usage: obj.test_twosample() without return types