code: def test_voxel_selection_with_two_masks():
      fake_raw_data1 = [create_epoch() for i in range(8)]
      fake_raw_data2 = [create_epoch() for i in range(8)]
      labels = [0, 1, 0, 1, 0, 1, 0, 1]
      # 2 subjects, 4 epochs per subject
      vs = VoxelSelector(
          labels,
          4,
          2,
          fake_raw_data1,
          raw_data2=fake_raw_data2,
          voxel_unit=1,
      )
      # for cross validation, use SVM with precomputed kernel
      # no shrinking, set C=1
      clf = svm.SVC(
          kernel="precomputed", shrinking=False, C=1, gamma="auto"
      )
      results = vs.run(clf)
      if MPI.COMM_WORLD.Get_rank() == 0:
          output = [None] * len(results)
          for tuple in results:
              output[tuple[0]] = int(8 * tuple[1])
          expected_output = [3, 3, 3, 6, 6]
          assert np.allclose(
              output, expected_output, atol=1
          ), "voxel selection via SVM does not provide correct results"
      # for cross validation, use logistic regression
      clf = LogisticRegression()
      results = vs.run(clf)
      if MPI.COMM_WORLD.Get_rank() == 0:
          output = [None] * len(results)
          for tuple in results:
              output[tuple[0]] = int(8 * tuple[1])
          expected_output = [3, 4, 4, 6, 6]
          assert np.allclose(output, expected_output, atol=1), (
              "voxel selection via logistic regression does not provide correct "
              "results"
          )
  
file_path: brainiak/tests/fcma/test_voxel_selection.py
imports: import conftest
  from brainiak.fcma.voxelselector import VoxelSelector
  from scipy.stats.mstats import zscore
  from sklearn import svm
  from sklearn.linear_model import LogisticRegression
  import numpy
  import math
  from mpi4py import MPI
  from numpy.random import RandomState
label_desc: Use image node_id 3 for calling a global function with example usage: test_voxel_selection_with_two_masks() without return types