code: def test_compute_mask_strategy(strategy):
      imgs = _get_random_imgs((9, 9, 5), 2)
      masker = MultiNiftiMasker(
          mask_strategy=strategy, mask_args={"opening": 1}
      )
      masker.fit(imgs)
      # Check that the order of the images does not change the output
      masker2 = MultiNiftiMasker(
          mask_strategy=strategy, mask_args={"opening": 1}
      )
      masker2.fit(imgs[::-1])
      mask_ref = np.zeros((9, 9, 5), dtype="int8")
      np.testing.assert_array_equal(
          get_data(masker.mask_img_), mask_ref
      )
      np.testing.assert_array_equal(
          get_data(masker2.mask_img_), mask_ref
      )
  
imports: import shutil
  from tempfile import mkdtemp
  import numpy
  import pytest
  from joblib import Memory
  from nibabel import Nifti1Image
  from numpy.testing import assert_array_equal
  from nilearn._utils.exceptions import DimensionError
  from nilearn._utils.testing import write_imgs_to_path
  from nilearn.conftest import _rng
  from nilearn.image import get_data
  from nilearn.maskers import MultiNiftiMasker
label_desc: Use image node_id 9 for calling a global function with example usage: test_compute_mask_strategy(strategy) without return types