code: def transform(self, X):
          '''
          Transform the segmented time series data into feature data.
          If contextual data is included in X, it is returned with the feature data.
  
          Parameters
          ----------
          X : array-like, shape [n_series, ...]
              Segmented time series data and (optionally) contextual data
  
          Returns
          -------
          X_new : array shape [n_series, ...]
              Feature representation of segmented time series data and contextual data
  
          '''
          self._check_if_fitted()
          Xt, Xc = get_ts_data_parts(X)
          check_array(Xt, dtype='numeric', ensure_2d=False, allow_nd=True)
  
          fts = np.column_stack([self.features[f](Xt) for f in self.features])
          if Xc is not None:
              fts = np.column_stack([fts, Xc])
          return ftf transform(self, X):
          '''
          Transform the segmented time series data into feature data.
          If contextual data is included in X, it is returned with the feature data.
  
          Parameters
          ----------
          X : array-like, shape [n_series, ...]
              Segmented time series data and (optionally) contextual data
  
          Returns
          -------
          X_new : array shape [n_series, ...]
              Feature representation of segmented time series data and contextual data
  
          '''
          self._check_if_fitted()
          Xt, Xc = get_ts_data_parts(X)
          check_array(Xt, dtype='numeric', ensure_2d=False, allow_nd=True)
  
          fts = np.column_stack([self.features[f](Xt) for f in self.features])
          if Xc is not None:
              fts = np.column_stack([fts, Xc])
          return fts
docs: Transform the segmented time series data into feature data.
          If contextual data is included in X, it is returned with the feature data.
  
          Parameters
          ----------
          X : array-like, shape [n_series, ...]
              Segmented time series data and (optionally) contextual data
  
          Returns
          -------
          X_new : array shape [n_series, ...]
              Feature representation of segmented time series data and contextual data