code: def test_plot_glass_brain_colorbar_having_nans(
      affine_eye, img_3d_mni
  ):
      """Smoke-test for plot_glass_brain and nans in the data image."""
      data = get_data(img_3d_mni)
      data[6, 5, 2] = np.inf
      plot_glass_brain(Nifti1Image(data, affine_eye), colorbar=True)
      plt.close()
  
file_path: nilearn/nilearn/plotting/tests/test_img_plotting/test_plot_glass_brain.py
imports: import matplotlib.pyplot
  import numpy
  import pytest
  from nibabel import Nifti1Image
  from nilearn.image import get_data
  from nilearn.plotting import plot_glass_brain
label_desc: Use image node_id 5 for calling a global function with example usage: test_plot_glass_brain_colorbar_having_nans(affine_eye, img_3d_mni) without return types