code: def _group_iter_search_light(
      list_rows,
      estimator,
      X,
      y,
      groups,
      scoring,
      cv,
      thread_id,
      total,
      verbose=0,
  ):
      """Perform grouped iterations of search_light.
  
      Parameters
      ----------
      list_rows : array of arrays of int
          adjacency rows. For a voxel with index i in X, list_rows[i] is the list
          of neighboring voxels indices (in X).
  
      estimator : estimator object implementing 'fit'
          object to use to fit the data
  
      X : array-like of shape at least 2D
          data to fit.
  
      y : array-like
          target variable to predict.
  
      groups : array-like, optional
          group label for each sample for cross validation.
  
      scoring : string or callable, optional
          Scoring strategy to use. See the scikit-learn documentation.
          If callable, takes as arguments the fitted estimator, the
          test data (X_test) and the test target (y_test) if y is
          not None.
  
      cv : cross-validation generator, optional
          A cross-validation generator. If None, a 3-fold cross validation is
          used or 3-fold stratified cross-validation when y is supplied.
  
      thread_id : int
          process id, used for display.
  
      total : int
          Total number of voxels, used for display
  
      verbose : int, default=0
          The verbosity level.
  
      Returns
      -------
      par_scores : numpy.ndarray
          score for each voxel. dtype: float64.
      """
      par_scores = np.zeros(len(list_rows))
      t0 = time.time()
      for i, row in enumerate(list_rows):
          kwargs = {"scoring": scoring, "groups": groups}
          par_scores[i] = np.mean(
              cross_val_score(
                  estimator, X[:, row], y, cv=cv, n_jobs=1, **kwargs
              )
          )
          if verbose > 0:
              # One can't print less than each 10 iterations
              step = 11 - min(verbose, 10)
              if i % step == 0:
                  # If there is only one job, progress information is fixed
                  crlf = "\r" if total == len(list_rows) else "\n"
                  percent = float(i) / len(list_rows)
                  percent = round(percent * 100, 2)
                  dt = time.time() - t0
                  # We use a max to avoid a division by zero
                  remaining = (
                      (100.0 - percent) / max(0.01, percent) * dt
                  )
                  sys.stderr.write(
                      f"Job #{thread_id}, processed {i}/{len(list_rows)} voxels "
                      f"({percent:0.2f}%, {remaining} seconds remaining){crlf}"
                  )
      return par_scores
  
imports: import sys
  import time
  import warnings
  import numpy
  from joblib import Parallel, cpu_count, delayed
  from sklearn import svm
  from sklearn.base import BaseEstimator
  from sklearn.exceptions import ConvergenceWarning
  from sklearn.model_selection import cross_val_score
  from nilearn.maskers.nifti_spheres_masker import _apply_mask_and_get_affinity
  from ..None import masking
  from .._utils import check_niimg_4d, fill_doc
  from ..image.resampling import coord_transform
label_desc: Use image node_id 2 for calling a global function with example usage: _group_iter_search_light(list_rows, estimator, X, y, groups, scoring, cv, thread_id, total, verbose) and returns: par_scores