code: def test_nifti_maps_masker_report_integer_and_all_displayed_maps(
      niftimapsmasker_inputs, displayed_maps
  ):
      """Tests NiftiMapsMasker reporting with no image provided to fit
      and displayed_maps provided as an integer or as 'all'.
      """
      masker = NiftiMapsMasker(**niftimapsmasker_inputs)
      masker.fit()
      expected_n_maps = (
          9 if displayed_maps == "all" else min(9, displayed_maps)
      )
      if displayed_maps != "all" and displayed_maps > 9:
          with pytest.warns(
              UserWarning, match="masker only has 9 maps."
          ):
              html = masker.generate_report(displayed_maps)
      else:
          html = masker.generate_report(displayed_maps)
      assert masker._report_content["report_id"] == 0
      assert masker._report_content["number_of_maps"] == 9
      assert masker._report_content["displayed_maps"] == list(
          range(expected_n_maps)
      )
      msg = (
          "No image provided to fit in NiftiMapsMasker. "
          "Plotting only spatial maps for reporting."
      )
      assert masker._report_content["warning_message"] == msg
      assert html.body.count("<img") == expected_n_maps
  
imports: from collections import Counter
  import numpy
  import pytest
  from nibabel import Nifti1Image
  from numpy.testing import assert_almost_equal
  from nilearn._utils.data_gen import generate_fake_fmri, generate_labeled_regions, generate_maps, generate_random_img
  from nilearn.image import get_data, new_img_like
  from nilearn.maskers import MultiNiftiLabelsMasker, MultiNiftiMapsMasker, MultiNiftiMasker, NiftiLabelsMasker, NiftiMapsMasker, NiftiMasker, NiftiSpheresMasker
label_desc: Use image node_id 14 for calling a global function with example usage: test_nifti_maps_masker_report_integer_and_all_displayed_maps(niftimapsmasker_inputs, displayed_maps) without return types