code: def _sl_score(estimators, scoring, X, y):
      """Aux. function to score SlidingEstimator in parallel.
  
      Predict and score each slice of data.
  
      Parameters
      ----------
      estimators : list, shape (n_tasks,)
          The fitted estimators.
      X : array, shape (n_samples, nd_features, n_tasks)
          The target data. The feature dimension can be multidimensional e.g.
          X.shape = (n_samples, n_features_1, n_features_2, n_tasks)
      scoring : callable, str or None
          If scoring is None (default), the predictions are internally
          generated by estimator.score(). Else, we must first get the
          predictions to pass them to ad-hoc scorer.
      y : array, shape (n_samples,) | (n_samples, n_targets)
          The target values.
  
      Returns
      -------
      score : array, shape (n_tasks,)
          The score for each task / slice of data.
      """
      n_tasks = X.shape[-1]
      score = np.zeros(n_tasks)
      for ii, est in enumerate(estimators):
          score[ii] = scoring(est, X[..., ii], y)
      return score
  
imports: import logging
  import numpy
  from ..fixes import _get_check_scoring
  from ..parallel import parallel_func
  from ..utils import ProgressBar, _parse_verbose, array_split_idx, fill_doc, verbose
  from .base import BaseEstimator, _check_estimator
  from .mixin import TransformerMixin
label_desc: Use image node_id 4 for calling a global function with example usage: _sl_score(estimators, scoring, X, y) and returns: score