code: def test_nifti_spheres_masker_reporting_mpl_warning():
      """Raise warning after exception if matplotlib is not installed."""
      with warnings.catch_warnings(record=True) as warning_list:
          result = (
              NiftiSpheresMasker([(1, 1, 1)]).fit().generate_report()
          )
  
      assert len(warning_list) == 1
      assert issubclass(warning_list[0].category, ImportWarning)
      assert result == [None]
  
imports: import warnings
  import nibabel
  import numpy
  import pytest
  from numpy.testing import assert_array_almost_equal, assert_array_equal
  from nilearn._utils import data_gen
  from nilearn.image import get_data, new_img_like
  from nilearn.maskers import NiftiSpheresMasker
label_desc: Use image node_id 13 for calling a global function with example usage: test_nifti_spheres_masker_reporting_mpl_warning() without return types