code: def test_temporal_k_fold():
      # test length 1 series
      splitter = TemporalKFold()
      X = [rand(100, 10)]
      y = [5]
      Xs, ys, cv = splitter.split(X, y)
      check_folds(Xs, ys, cv)
  
      X = [rand(100, 10)]
      y = [rand(100)]
      Xs, ys, cv = splitter.split(X, y)
      check_folds(Xs, ys, cv)
  
      Xt = [rand(100, 10)]
      Xc = [5]
      X = TS_Data(Xt, Xc)
      y = [rand(100)]
      Xs, ys, cv = splitter.split(X, y)
      check_folds(Xs, ys, cv)
  
      # test with lots of series
      splitter = TemporalKFold()
      Ns = 5
      X = np.array([rand(100, 10)] * Ns)
      y = rand(Ns)
      Xs, ys, cv = splitter.split(X, y)
      check_folds(Xs, ys, cv)
  
      X = np.array([rand(100, 10)] * Ns)
      y = np.array([rand(100)] * Ns)
      Xs, ys, cv = splitter.split(X, y)
      check_folds(Xs, ys, cv)
  
      Xt = np.array([rand(100, 10)] * Ns)
      Xc = rand(Ns)
      X = TS_Data(Xt, Xc)
      y = np.array([rand(100)] * Ns)
      Xs, ys, cv = splitter.split(X, y)
      check_folds(Xs, ys, cv)
  
      Xt = np.array([rand(100, 10)] * Ns)
      Xc = rand(Ns)
      X = TS_Data(Xt, Xc)
      y = rand(Ns)
      Xs, ys, cv = splitter.split(X, y)
      check_folds(Xs, ys, cv)
  
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 2 for calling a global function with example usage: test_temporal_k_fold() without return types