code: def test_surrogate_array_3d():
      """Check that with no noise, the surrogate activation correspond to
      the ones that we specify. 3D version
      """
      # We can't use random positions, as the positions have to be
      # far-enough not to overlap.
      pos = np.array(
          [
              [2, 10, 2],
              [10, 4, 4],
              [18, 13, 18],
              [13, 18, 5],
              [5, 18, 18],
          ]
      )
      ampli = np.random.random(5)
      data = surrogate_3d_dataset(
          n_subj=1,
          noise_level=0,
          spatial_jitter=0,
          signal_jitter=0,
          pos=pos,
          shape=(20, 20, 20),
          ampli=ampli,
      ).squeeze()
      x, y, z = pos.T
      np.testing.assert_array_equal(data[x, y, z], ampli)
  
file_path: nipy/nipy/labs/utils/tests/test_simul_multisubject_fmri_dataset.py
imports: import numpy
  from nibabel import Nifti1Image
  from ..simul_multisubject_fmri_dataset import surrogate_2d_dataset, surrogate_3d_dataset, surrogate_4d_dataset
label_desc: Use image node_id 2 for calling a global function with example usage: test_surrogate_array_3d() without return types