code: def cut_X_ts(X):
      """Cut X values to different lengths across variables."""
      arr = X.values
      for row_i in range(X.shape[0]):
          for dim_i in range(X.shape[1]):
              ts = X.iloc[row_i, dim_i]
              arr[row_i, dim_i] = pd.Series(
                  ts.tolist()[: len(ts) - dim_i - 1]
              )
      return pd.DataFrame(arr, index=X.index, columns=X.columns)
  
imports: import pandas
  from sktime.datasets import load_basic_motions
  from sktime.transformations.panel.interpolate import TSInterpolator
label_desc: Use image node_id 1 for calling a global function with example usage: cut_X_ts(X) and returns: pd