code: def _make_stat_maps(model, contrasts, output_type="z_score"):
      """Given a model and contrasts, return the corresponding z-maps.
  
      Parameters
      ----------
      model : FirstLevelModel or SecondLevelModel object
          Must have a fitted design matrix(ces).
  
      contrasts : Dict[str, ndarray or str]
          Dict of contrasts for a first or second level model.
          Corresponds to the contrast_def for the FirstLevelModel
          (nilearn.glm.first_level.FirstLevelModel.compute_contrast)
          & second_level_contrast for a SecondLevelModel
          (nilearn.glm.second_level.SecondLevelModel.compute_contrast)
  
      output_type : :obj:`str`, default='z_score'
          The type of statistical map to retain from the contrast.
  
          .. versionadded:: 0.9.2
  
      Returns
      -------
      statistical_maps : Dict[str, niimg]
          Dict of statistical z-maps keyed to contrast names/titles.
  
      See Also
      --------
      nilearn.glm.first_level.FirstLevelModel.compute_contrast
      nilearn.glm.second_level.SecondLevelModel.compute_contrast
  
      """
      statistical_maps = {
          contrast_id: model.compute_contrast(
              contrast_val,
              output_type=output_type,
          )
          for contrast_id, contrast_val in contrasts.items()
      }
      return statistical_maps
  
imports: import os
  import string
  import warnings
  from collections import OrderedDict
  from collections.abc import Iterable
  from html import escape
  import numpy
  import pandas
  from matplotlib import pyplot
  from nilearn.plotting import plot_glass_brain, plot_roi, plot_stat_map
  from nilearn.plotting.img_plotting import MNI152TEMPLATE
  from nilearn.plotting.matrix_plotting import plot_contrast_matrix, plot_design_matrix
  from nilearn.reporting.html_report import HTMLReport
  from .._utils import fill_doc
  from nilearn._utils import check_niimg
  from nilearn.maskers import NiftiMasker
  from nilearn.reporting.get_clusters_table import get_clusters_table
  from nilearn.reporting.utils import figure_to_svg_quoted
label_desc: Use image node_id 8 for calling a global function with example usage: _make_stat_maps(model, contrasts, output_type) and returns: statistical_maps