code: def _sl_transform(estimators, X, method, pb):
      """Aux. function to transform SlidingEstimator in parallel.
  
      Applies transform/predict/decision_function etc for each slice of data.
  
      Parameters
      ----------
      estimators : list of estimators
          The fitted estimators.
      X : array, shape (n_samples, nd_features, n_estimators)
          The target data. The feature dimension can be multidimensional e.g.
          X.shape = (n_samples, n_features_1, n_features_2, n_estimators)
      method : str
          The estimator method to use (e.g. 'predict', 'transform').
      pb : instance of ProgressBar
          The progress bar to update.
  
      Returns
      -------
      y_pred : array, shape (n_samples, n_estimators, n_classes * (n_classes-1) // 2)
          The transformations for each slice of data.
      """  # noqa: E501
      for ii, est in enumerate(estimators):
          transform = getattr(est, method)
          _y_pred = transform(X[..., ii])
          # Initialize array of predictions on the first transform iteration
          if ii == 0:
              y_pred = _sl_init_pred(_y_pred, X)
          y_pred[:, ii, ...] = _y_pred
  
          pb.update(ii + 1)
      return y_pred
  
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 2 for calling a global function with example usage: _sl_transform(estimators, X, method, pb) and returns: y_pred