code: def test_fit_no_mask_no_img_error():
      """Check error is raised when no mask and no img is provided."""
      mask = NiftiMasker(mask_img=None)
      with pytest.raises(
          ValueError, match="Parameter 'imgs' must be provided to "
      ):
          mask.fit()
  
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 16 for calling a global function with example usage: test_fit_no_mask_no_img_error() without return types