code: def plot_glass_brain(
      stat_map_img,
      output_file=None,
      display_mode="ortho",
      colorbar=False,
      cbar_tick_format="%.2g",
      figure=None,
      axes=None,
      title=None,
      threshold="auto",
      annotate=True,
      black_bg=False,
      cmap=None,
      alpha=0.7,
      vmin=None,
      vmax=None,
      plot_abs=True,
      symmetric_cbar="auto",
      resampling_interpolation="continuous",
      radiological=False,
      **kwargs,
  ):
      """Plot 2d projections of an ROI/mask image (by default 3 projections:
      Frontal, Axial, and Lateral). The brain glass schematics
      are added on top of the image.
  
      The plotted image should be in :term:`MNI` space for this function to work
      properly.
  
      Only glass brain can be plotted by switching stat_map_img to None.
  
      Parameters
      ----------
      stat_map_img : Niimg-like object
          See :ref:`extracting_data`.
          The statistical map image.
          It needs to be in :term:`MNI` space
          in order to align with the brain schematics.
      %(output_file)s
      display_mode : string, default='ortho'
          Choose the direction of the cuts: 'x' - sagittal, 'y' - coronal,
          'z' - axial, 'l' - sagittal left hemisphere only,
          'r' - sagittal right hemisphere only, 'ortho' - three cuts are
          performed in orthogonal directions. Possible values are: 'ortho',
          'x', 'y', 'z', 'xz', 'yx', 'yz', 'l', 'r', 'lr', 'lzr', 'lyr',
          'lzry', 'lyrz'.
      %(colorbar)s
          Default=False.
      cbar_tick_format: str, default="%%.2g" (scientific notation)
          Controls how to format the tick labels of the colorbar.
          Ex: use "%%i" to display as integers.
      %(figure)s
      %(axes)s
      %(title)s
      %(threshold)s
          Default='auto'.
      %(annotate)s
      %(black_bg)s
          Default=False.
      %(cmap)s
          Default=None.
      alpha : float between 0 and 1, default=0.7
          Alpha transparency for the brain schematics.
      %(vmin)s
      %(vmax)s
      plot_abs : boolean, default=True
          If set to True maximum intensity projection of the
          absolute value will be used (rendering positive and negative
          values in the same manner). If set to false the sign of the
          maximum intensity will be represented with different colors.
          See
          :ref:`sphx_glr_auto_examples_01_plotting_plot_demo_glass_brain_extensive.py` # noqa
          for examples.
      %(symmetric_cbar)s
      %(resampling_interpolation)s
          Default='continuous'.
      %(radiological)s
  
      Returns
      -------
      display : :class:`~nilearn.plotting.displays.OrthoProjector` or None
          An instance of the OrthoProjector class. If ``output_file`` is defined,
          None is returned.
  
      Notes
      -----
      Arrays should be passed in numpy convention: (x, y, z) ordered.
  
      """
      if cmap is None:
          cmap = cm.cold_hot if black_bg else cm.cold_white_hot
          # use only positive half of colormap if plotting absolute values
          if plot_abs:
              cmap = LinearSegmentedColormap.from_list(
                  "cmap_pos",
                  cmap(np.linspace(0.5, 1, 256)),
              )
  
      if stat_map_img:
          stat_map_img = _utils.check_niimg_3d(
              stat_map_img, dtype="auto"
          )
          if plot_abs:
              if vmin is not None and vmin < 0:
                  warnings.warn(
                      "vmin is negative but plot_abs is True",
                      category=UserWarning,
                  )
              force_min_stat_map_value = 0
          else:
              force_min_stat_map_value = None
  
          (
              cbar_vmin,
              cbar_vmax,
              vmin,
              vmax,
          ) = get_colorbar_and_data_ranges(
              safe_get_data(stat_map_img, ensure_finite=True),
              vmin=vmin,
              vmax=vmax,
              symmetric_cbar=symmetric_cbar,
              force_min_stat_map_value=force_min_stat_map_value,
          )
      else:
          cbar_vmin, cbar_vmax = None, None
  
      def display_factory(display_mode):
          return functools.partial(
              get_projector(display_mode),
              alpha=alpha,
              plot_abs=plot_abs,
          )
  
      display = _plot_img_with_bg(
          img=stat_map_img,
          output_file=output_file,
          display_mode=display_mode,
          figure=figure,
          axes=axes,
          title=title,
          annotate=annotate,
          black_bg=black_bg,
          threshold=threshold,
          cmap=cmap,
          colorbar=colorbar,
          cbar_tick_format=cbar_tick_format,
          display_factory=display_factory,
          vmin=vmin,
          vmax=vmax,
          cbar_vmin=cbar_vmin,
          cbar_vmax=cbar_vmax,
          resampling_interpolation=resampling_interpolation,
          radiological=radiological,
          **kwargs,
      )
  
      if stat_map_img is None and "l" in display.axes:
          display.axes["l"].ax.invert_xaxis()
  
      return display
  
imports: import collections.abc
  import functools
  import numbers
  import os
  import warnings
  import matplotlib
  import matplotlib.pyplot
  import numpy
  from matplotlib import gridspec
  from matplotlib.colors import LinearSegmentedColormap
  from nibabel.spatialimages import SpatialImage
  from scipy import stats
  from scipy.ndimage import binary_fill_holes
  from nilearn.image.resampling import reorder_img
  from nilearn.maskers import NiftiMasker
  from nilearn.plotting.displays import get_projector, get_slicer
  from nilearn.plotting.displays._slicers import _get_cbar_ticks
  from ..None import _utils
  from .._utils import compare_version, fill_doc
  from .._utils.extmath import fast_abs_percentile
  from .._utils.ndimage import get_border_data
  from .._utils.niimg import safe_get_data
  from .._utils.numpy_conversions import as_ndarray
  from .._utils.param_validation import check_threshold
  from ..datasets import load_mni152_template
  from ..image import get_data, iter_img, math_img, new_img_like, resample_to_img
  from ..masking import apply_mask, compute_epi_mask
  from ..signal import clean
  from .None import cm
label_desc: Use image node_id 13 for calling a global function with example usage: plot_glass_brain(stat_map_img, output_file, display_mode, colorbar, cbar_tick_format, figure, axes, title, threshold, annotate, black_bg, cmap, alpha, vmin, vmax, plot_abs, symmetric_cbar, resampling_interpolation, radiological) and returns: display, functools