code: def load_mni152_gm_template(resolution=None):
      """Load the MNI152 grey-matter template.
  
      This function takes the re-scaled 1mm-resolution version of the grey-matter
      MNI ICBM152 template and re-samples it using a different resolution,
      if specified.
  
      .. versionadded:: 0.8.1
  
      Parameters
      ----------
      resolution: int, default=1
          If resolution is different from 1, the template is re-sampled with the
          specified resolution.
  
      Returns
      -------
      gm_mni152_template : Nifti1Image, image representing the resampled
          grey-matter template
  
      See Also
      --------
      nilearn.datasets.load_mni152_template : for details about version of the
          MNI152 T1 template.
  
      nilearn.datasets.load_mni152_wm_template : for details about version of the
          MNI152 white-matter template.
  
      """
      resolution = resolution or 1
  
      gm_template = check_niimg(GM_MNI152_FILE_PATH)
  
      # Typecasting
      gm_data = get_data(gm_template).astype("float32")
  
      # Re-scale template from 0 to 1
      gm_data /= gm_data.max()
      new_gm_template = new_img_like(gm_template, gm_data)
  
      # Resample template according to the pre-specified resolution, if different
      # than 1
      if resolution != 1:
          new_gm_template = resampling.resample_img(
              new_gm_template, np.eye(3) * resolution
          )
  
      return new_gm_template
  
imports: import functools
  import os
  import warnings
  from pathlib import Path
  import numpy
  import pandas
  from scipy.ndimage import binary_closing
  from sklearn.utils import Bunch
  from .._utils import check_niimg, fill_doc
  from ..image import get_data, new_img_like, resampling
  from ._utils import fetch_files, get_dataset_descr, get_dataset_dir
label_desc: Use image node_id 3 for calling a global function with example usage: load_mni152_gm_template(resolution) and returns: new_gm_template