code: def test_compute_brain_mask(strategy, mask_args, expected_mask):
      """Check masker for template masking strategy."""
      img, _ = data_gen.generate_random_img((9, 9, 5))
  
      masker = NiftiMasker(mask_strategy=strategy, mask_args=mask_args)
      masker.fit(img)
  
      np.testing.assert_array_equal(
          get_data(masker.mask_img_), expected_mask
      )
  
imports: import os
  import shutil
  import warnings
  from tempfile import mkdtemp
  import nibabel
  import numpy
  import pytest
  from numpy.testing import assert_array_equal
  from nilearn._utils import data_gen, exceptions, testing
  from nilearn._utils.class_inspect import get_params
  from nilearn.image import get_data, index_img
  from nilearn.maskers import NiftiMasker
  from nilearn.maskers.nifti_masker import _filter_and_mask
label_desc: Use image node_id 20 for calling a global function with example usage: test_compute_brain_mask(strategy, mask_args, expected_mask) without return types