code: def test_plot_anat_colorbar(
      anat_img, display_mode, cbar_tick_format, tmp_path
  ):
      """Tests for plot_anat with MNI template and colorbar."""
      slicer = plot_anat(
          anat_img=anat_img,
          display_mode=display_mode,
          colorbar=True,
          cbar_tick_format=cbar_tick_format,
      )
      filename = tmp_path / "test.png"
      slicer.savefig(filename)
      plt.close()
  
file_path: nilearn/nilearn/plotting/tests/test_img_plotting/test_plot_anat.py
imports: import matplotlib.pyplot
  import pytest
  from nilearn.plotting import plot_anat
  from nilearn.plotting.img_plotting import MNI152TEMPLATE
label_desc: Use image node_id 2 for calling a global function with example usage: test_plot_anat_colorbar(anat_img, display_mode, cbar_tick_format, tmp_path) without return types