code: def _check_cv(cv, y, allow_empty_window=False):
      train_windows, test_windows = _get_windows(cv, y)
      _check_windows(
          train_windows, allow_empty_window=allow_empty_window
      )
      _check_windows(
          test_windows, allow_empty_window=allow_empty_window
      )
  
      cutoffs = cv.get_cutoffs(y)
      _check_cutoffs(cutoffs)
      _check_cutoffs_against_test_windows(
          cutoffs, test_windows, cv.fh, y
      )
      _check_cutoffs_against_train_windows(cutoffs, train_windows, y)
  
      n_splits = cv.get_n_splits(y)
      _check_n_splits(n_splits)
      assert (
          n_splits
          == len(train_windows)
          == len(test_windows)
          == len(cutoffs)
      )
  
      return train_windows, test_windows, cutoffs, n_splits
  
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 7 for calling a global function with example usage: _check_cv(cv, y, allow_empty_window) and returns: train_windows,  test_windows,  cutoffs,  n_splits