code: def _transform(X, intervals):
      """Transform X for given intervals.
  
      Compute the mean, standard deviation and slope for given intervals of input data X.
  
      Parameters
      ----------
      Xt: np.ndarray or pd.DataFrame
          Panel data to transform.
      intervals : np.ndarray
          Intervals containing start and end values.
  
      Returns
      -------
      Xt: np.ndarray or pd.DataFrame
       Transformed X, containing the mean, std and slope for each interval
      """
      n_instances, _ = X.shape
      n_intervals, _ = intervals.shape
      transformed_x = np.empty(
          shape=(3 * n_intervals, n_instances), dtype=np.float32
      )
      for j in range(n_intervals):
          X_slice = X[:, intervals[j][0] : intervals[j][1]]
          means = np.mean(X_slice, axis=1)
          std_dev = np.std(X_slice, axis=1)
          slope = _slope(X_slice, axis=1)
          transformed_x[3 * j] = means
          transformed_x[3 * j + 1] = std_dev
          transformed_x[3 * j + 2] = slope
  
      return transformed_x.T
  
file_path: sktime/sktime/series_as_features/base/estimators/interval_based/_tsf.py
imports: import math
  from typing import Optional
  import numpy
  from joblib import Parallel, delayed
  from numpy.random import RandomState
  from sklearn.utils.multiclass import class_distribution
  from sklearn.utils.validation import check_random_state
  from sktime.base._base import _clone_estimator
  from sktime.utils.slope_and_trend import _slope
  from sktime.utils.validation import check_n_jobs
label_desc: Use image node_id 3 for calling a global function with example usage: _transform(X, intervals) and returns: transformed_x