code: def check_split(X, Xtr, Xte, y, ytr, yte):
      assert len(Xtr) == len(ytr)
      assert len(Xte) == len(yte)
  
      if isinstance(X, TS_Data):
          assert isinstance(Xtr, TS_Data)
          assert isinstance(Xte, TS_Data)
          Xt = X.ts_data
          Xtrt = Xtr.ts_data
          Xtet = Xte.ts_data
          Xc = X.context_data
          Xtrc = Xtr.context_data
          Xtec = Xte.context_data
          check_static_var(Xc, Xtrc, Xtec)
          check_ts_var(Xt, Xtrt, Xtet)
      else:
          check_ts_var(X, Xtr, Xte)
  
      if len(np.atleast_1d(y[0])) > 1:
          check_ts_var(y, ytr, yte)
      else:
          check_static_var(y, ytr, yte)
  
file_path: seglearn/seglearn/tests/test_split.py
imports: from numpy.random import rand
  import numpy
  from seglearn.split import TemporalKFold, temporal_split
  from seglearn.base import TS_Data
label_desc: Use image node_id 5 for calling a global function with example usage: check_split(X, Xtr, Xte, y, ytr, yte) without return types