code: def test_variable_length_svm():
      X = to_time_series_dataset(
          [[1, 2, 3, 4], [1, 2, 3], [2, 5, 6, 7, 8, 9], [3, 5, 6, 7, 8]]
      )
      y = [0, 0, 1, 1]
      rng = np.random.RandomState(0)
      clf = TimeSeriesSVC(kernel="gak", random_state=rng)
      clf.fit(X, y)
      assert_allclose(clf.predict(X), [0, 0, 1, 1])
  
      y_reg = [-1.0, -1.3, 3.2, 4.1]
      clf = TimeSeriesSVR(kernel="gak")
      clf.fit(X, y_reg)
      assert_array_less(clf.predict(X[:2]), 0.0)
      assert_array_less(-clf.predict(X[2:]), 0.0)
  
file_path: tslearn/tslearn/tests/test_variablelength.py
imports: import numpy
  from numpy.testing import assert_allclose, assert_array_less
  from sklearn.model_selection import cross_val_score, KFold
  from tslearn.neighbors import KNeighborsTimeSeriesClassifier
  from tslearn.preprocessing import TimeSeriesScalerMeanVariance
  from tslearn.svm import TimeSeriesSVC, TimeSeriesSVR
  from tslearn.clustering import KernelKMeans, TimeSeriesKMeans
  from tslearn.utils import to_time_series_dataset
label_desc: Use image node_id 2 for calling a global function with example usage: test_variable_length_svm() without return types