code: def get_ts_data_parts(X):
      """
      Separates time series data object into time series variables and contextual variables
  
      Parameters
      ----------
      X : array-like, shape [n_series, ...]
         Time series data and (optionally) contextual data
  
      Returns
      -------
      Xt : array-like, shape [n_series, ]
          Time series data
      Xs : array-like, shape [n_series, n_contextd = np.colum _variables]
          contextual variables
  
      """
  
      if isinstance(X, TS_Data):
          return X.ts_data, X.context_data
      elif isinstance(X, DataFrame):
          return X.ts_data.values, X.drop(columns=["ts_data"]).values
      else:
          return X, None
  
file_path: seglearn/seglearn/util.py
imports: from pandas import DataFrame
  import numpy
  import warnings
  from seglearn.base import TS_Data
label_desc: Use image node_id 1 for calling a global function with example usage: get_ts_data_parts(X) and returns: X,  X, X,  X, X,  None