code: def _get_windows(cv, y):
      train_windows = []
      test_windows = []
  
      n_splits = 0
      for train, test in cv.split(y):
          n_splits += 1
          train_windows.append(train)
          test_windows.append(test)
      assert n_splits == cv.get_n_splits(y)
  
      return train_windows, test_windows
  
file_path: sktime/sktime/split/tests/test_split.py
imports: import numpy
  import pytest
  from sktime.forecasting.base import ForecastingHorizon
  from sktime.split import ExpandingWindowSplitter, SlidingWindowSplitter
  from sktime.utils.datetime import _coerce_duration_to_int
  from sktime.utils.validation import array_is_datetime64, array_is_int, array_is_timedelta_or_date_offset, is_int
  from sktime.utils.validation.forecasting import check_fh
label_desc: Use image node_id 1 for calling a global function with example usage: _get_windows(cv, y) and returns: train_windows,  test_windows