code: def _transform(X, interval, lag):
      """Compute the ACF and PS for given intervals of input data X."""
      from sktime.classification.interval_based._rise_numba import (
          _round_to_nearest_power_of_two,
          acf,
      )
  
      n_instances, _ = X.shape
      acf_x = np.empty(shape=(n_instances, lag))
      ps_len = _round_to_nearest_power_of_two(interval[1] - interval[0])
      ps_x = np.empty(shape=(n_instances, ps_len))
      for j in range(n_instances):
          interval_x = X[j, interval[0] : interval[1]]
          acf_x[j] = acf(interval_x, lag)
          ps_x[j] = ps(interval_x, n=ps_len * 2)
      # interval_x = X[:, interval[0]: interval[1]]
      # acf_x = matrix_acf(interval_x, n_instances, lag)
      # ps_x = _ps(interval_x, n=ps_len*2)
      transformed_x = np.concatenate((ps_x, acf_x), axis=1)
  
      return transformed_x
  
imports: import numpy
  from joblib import Parallel, delayed
  from sklearn.base import clone
  from sklearn.ensemble._base import _partition_estimators
  from sklearn.tree import DecisionTreeClassifier
  from sklearn.utils.validation import check_random_state
  from sktime.classification.base import BaseClassifier
label_desc: Use image node_id 1 for calling a global function with example usage: _transform(X, interval, lag) and returns: transformed_x