code: def test_mask_files(in_tmp_path):
      # Make a 4D file from the anatomical example
      img = nib.load(anatfile)
      arr = img.get_fdata()
      a2 = np.zeros(arr.shape + (2,))
      a2[:, :, :, 0] = arr
      a2[:, :, :, 1] = arr
      img = nib.Nifti1Image(a2, np.eye(4))
      a_fname = "fourd_anat.nii"
      nib.save(img, a_fname)
      # check 4D mask
      msk1, mean1 = nnm.compute_mask_files(a_fname, return_mean=True)
      # and mask from identical list of 3D files
      msk2, mean2 = nnm.compute_mask_files(
          [anatfile, anatfile], return_mean=True
      )
      assert_array_equal(msk1, msk2)
      assert_array_equal(mean1, mean2)
  
file_path: nipy/nipy/labs/tests/test_mask.py
imports: import nibabel
  import numpy
  from nipy.testing import anatfile, assert_array_equal
  from ..None import mask
  from ..mask import largest_cc, series_from_mask, threshold_connect_components
label_desc: Use image node_id 4 for calling a global function with example usage: test_mask_files(in_tmp_path) without return types