class_docstr: Resampler for time series. Resample time series so that they reach the
  target size.
  
  Parameters
  ----------
  sz : int
      Size of the output time series.
  
  Examples
  --------
  >>> TimeSeriesResampler(sz=5).fit_transform([[0, 3, 6]])
  array([[[0. ],
          [1.5],
          [3. ],
          [4.5],
          [6. ]]])
class_docstr_tok: ["Resampler","for","time","series",".","Resample","time","series","so","that","they","reach","the","target","size",".","Parameters","--","--","--","--","--","sz",":","int","Size","of","the","output","time","series",".","Examples","--","--","--","--",">",">",">","TimeSeriesResampler","(","sz=5",")",".fit_transform","(","[","[","0",",","3",",","6","]","]",")","array","(","[","[","[","0",".","]",",","[","1.5","]",",","[","3",".","]",",","[","4.5","]",",","[","6",".","]","]","]",")"]
docstr: Fit to data, then transform it.
  
  Parameters
  ----------
  X : array-like of shape (n_ts, sz, d)
      Time series dataset to be resampled.
  
  Returns
  -------
  numpy.ndarray
      Resampled time series dataset.
docstr_tok: ["Fit","to","data",",","then","transform","it",".","Parameters","--","--","--","--","--","X",":","array-like","of","shape","(","n_ts",",","sz",",","d",")","Time","series","dataset","to","be","resampled",".","Returns","--","--","--","-","numpy.ndarray","Resampled","time","series","dataset","."]
code: def transform(self, X, y=None, **kwargs):
      """Fit to data, then transform it.
  
      Parameters
      ----------
      X : array-like of shape (n_ts, sz, d)
          Time series dataset to be resampled.
  
      Returns
      -------
      numpy.ndarray
          Resampled time series dataset.
      """
      X_ = to_time_series_dataset(X)
      if self.sz_ == 1:
          return self._transform_unit_sz(X_)
      n_ts, sz, d = X_.shape
      equal_size = check_equal_size(X_)
      X_out = numpy.empty((n_ts, self.sz_, d))
      for i in range(X_.shape[0]):
          xnew = numpy.linspace(0, 1, self.sz_)
          if not equal_size:
              sz = ts_size(X_[i])
          for di in range(d):
              f = interp1d(
                  numpy.linspace(0, 1, sz),
                  X_[i, :sz, di],
                  kind="slinear",
              )
              X_out[i, :, di] = f(xnew)
      return X_out
  
imports: import numpy
  from sklearn.base import TransformerMixin
  from sklearn.utils import check_array
  from sklearn.utils.validation import check_is_fitted
  from scipy.interpolate import interp1d
  import warnings
  from tslearn.utils import to_time_series_dataset, check_equal_size, ts_size, check_dims
  from tslearn.bases import TimeSeriesBaseEstimator
label_desc: Use image node_id 5 for calling the TimeSeriesResampler obj's underlying member method code with example usage: obj.transform(X, y) and returns: X_out, self