code: def _wrap_param_grid(param_grid, param_name):
      """Wrap a parameter's sequence of values with an outer list.
  
      This can be desirable for models featuring built-in cross-validation,
      as it would leave it to the model's internal (optimized) cross-validation
      to loop over hyperparameter values. Does nothing if the parameter is
      already wrapped.
  
      Parameters
      ----------
      param_grid : dict of str to sequence, or sequence of such
          The parameter grid to wrap, as a dictionary mapping estimator
          parameters to sequences of allowed values.
      param_name : str
          Name of parameter whose sequence of values should be wrapped
  
      Returns
      -------
      dict of str to sequence, or sequence of such
          The updated parameter grid
      """
      if param_grid is None:
          return param_grid
  
      # param_grid can be either a dict or a sequence of dicts
      # we make sure that it is a sequence we can loop over
      input_is_dict = isinstance(param_grid, dict)
      if input_is_dict:
          param_grid = [param_grid]
  
      # process dicts one by one and add them to a new list
      new_param_grid = []
      for param_grid_item in param_grid:
          if param_name in param_grid_item and not isinstance(
              param_grid_item[param_name][0], Iterable
          ):
              warnings.warn(
                  f"parameter '{param_name}' should be a sequence of iterables"
                  f" (e.g., {{param_name: [[1, 10, 100]]}}) to benefit from"
                  " the built-in cross-validation of the estimator."
                  f" Wrapping {param_grid_item[param_name]} in an outer list."
              )
  
              param_grid_item = dict(param_grid_item)  # make a new dict
              param_grid_item[param_name] = [
                  param_grid_item[param_name]
              ]
  
          new_param_grid.append(param_grid_item)
  
      # return a dict (not a list) if the original input was a dict
      if input_is_dict:
          new_param_grid = new_param_grid[0]
  
      return new_param_grid
  
imports: import itertools
  import warnings
  from typing import Iterable
  import numpy
  from joblib import Parallel, delayed
  from sklearn import clone
  from sklearn.base import BaseEstimator, MultiOutputMixin
  from sklearn.dummy import DummyClassifier, DummyRegressor
  from sklearn.linear_model import LassoCV, LogisticRegressionCV, RidgeClassifierCV, RidgeCV
  from sklearn.metrics import check_scoring, get_scorer
  from sklearn.model_selection import LeaveOneGroupOut, ParameterGrid, ShuffleSplit, StratifiedShuffleSplit, check_cv
  from sklearn.preprocessing import LabelBinarizer
  from sklearn.svm import SVR, LinearSVC, l1_min_c
  from sklearn.utils.extmath import safe_sparse_dot
  from sklearn.utils.validation import check_is_fitted, check_X_y
  from nilearn._utils import CacheMixin, fill_doc
  from nilearn._utils.cache_mixin import _check_memory
  from nilearn._utils.masker_validation import check_embedded_masker
  from nilearn._utils.param_validation import check_feature_screening
  from nilearn.experimental.surface import SurfaceMasker
  from nilearn.regions.rena_clustering import ReNA
label_desc: Use image node_id 3 for calling a global function with example usage: _wrap_param_grid(param_grid, param_name) and returns: new_param_grid, param_grid