code: def plot_contrast(first_level_model):
      """Specify, estimate and plot the main contrasts \
          for given a first model."""
      design_matrix = first_level_model.design_matrices_[0]
      # Call the contrast specification within the function
      contrasts = make_localizer_contrasts(design_matrix)
      plt.figure(figsize=(11, 3))
      # compute the per-contrast z-map
      for index, (contrast_id, contrast_val) in enumerate(
          contrasts.items()
      ):
          ax = plt.subplot(1, len(contrasts), 1 + index)
          z_map = first_level_model.compute_contrast(
              contrast_val, output_type="z_score"
          )
          plotting.plot_stat_map(
              z_map,
              display_mode="z",
              threshold=3.0,
              title=contrast_id,
              axes=ax,
              cut_coords=1,
          )
  
file_path: nilearn/examples/04_glm_first_level/plot_first_level_details.py
imports: from nilearn.datasets import func
  import pandas
  from nilearn.glm.first_level import FirstLevelModel
  from nilearn.plotting import plot_design_matrix
  import matplotlib.pyplot
  import numpy
  from nilearn.plotting import plot_contrast_matrix
  from nilearn import plotting
  from nilearn.image import high_variance_confounds
  from nilearn.datasets import fetch_icbm152_brain_gm_mask
  from nilearn.plotting import plot_roi
  from nilearn.image import resample_to_img
label_desc: Use image node_id 2 for calling a global function with example usage: plot_contrast(first_level_model) without return types