code: def test_expanding_greedy_splitter_lengths():
      """Test that ExpandingGreedySplitter returns the correct lengths."""
      y = np.arange(10)
      cv = ExpandingGreedySplitter(test_size=2, folds=3)
  
      lengths = [
          (len(trn), len(tst)) for trn, tst in cv.split_series(y)
      ]
      assert lengths == [(4, 2), (6, 2), (8, 2)]
  
file_path: sktime/sktime/split/tests/test_expandinggreedy.py
imports: import numpy
  import pandas
  from sktime.split import ExpandingGreedySplitter
  from sktime.utils._testing.hierarchical import _make_hierarchical
  from sktime.utils._testing.series import _make_series
label_desc: Use image node_id 1 for calling a global function with example usage: test_expanding_greedy_splitter_lengths() without return types