code: def test_temporal_split():
      # test with length 1 series
      X = [rand(100, 10)]
      y = [5]
      Xtr, Xte, ytr, yte = temporal_split(X, y)
      check_split(X, Xtr, Xte, y, ytr, yte)
  
      X = [rand(100, 10)]
      y = [rand(100)]
      Xtr, Xte, ytr, yte = temporal_split(X, y)
      check_split(X, Xtr, Xte, y, ytr, yte)
  
      Xt = [rand(100, 10)]
      Xc = [5]
      X = TS_Data(Xt, Xc)
      y = [rand(100)]
      Xtr, Xte, ytr, yte = temporal_split(X, y)
      check_split(X, Xtr, Xte, y, ytr, yte)
  
      # test with lots of series
      Ns = 5
      X = np.array([rand(100, 10)] * Ns)
      y = rand(Ns)
      Xtr, Xte, ytr, yte = temporal_split(X, y)
      check_split(X, Xtr, Xte, y, ytr, yte)
  
      X = np.array([rand(100, 10)] * Ns)
      y = np.array([rand(100)] * Ns)
      Xtr, Xte, ytr, yte = temporal_split(X, y)
      check_split(X, Xtr, Xte, y, ytr, yte)
  
      Xt = np.array([rand(100, 10)] * Ns)
      Xc = rand(Ns)
      X = TS_Data(Xt, Xc)
      y = np.arange(Ns)
      Xtr, Xte, ytr, yte = temporal_split(X, y)
      check_split(X, Xtr, Xte, 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 1 for calling a global function with example usage: test_temporal_split() without return types