code: def test_surrogate_array_4d_dmtx():
      """Run the 4D version, with design_matrix provided"""
      shape = (5, 5, 5)
      n_scans = 25
      out_shape = shape + (n_scans,)
      dmtx = np.random.randn(n_scans, 3)
      imgs = surrogate_4d_dataset(shape, dmtx=dmtx)
      assert not np.any(
          np.asarray(imgs[0].shape) - np.asarray(out_shape)
      )
  
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 8 for calling a global function with example usage: test_surrogate_array_4d_dmtx() without return types