code: def test_single_window_splitter_default_window_length(y, fh):
      """Test SingleWindowSplitter."""
      cv = SingleWindowSplitter(fh=fh)
      train_windows, test_windows, cutoffs, n_splits = _check_cv(cv, y)
  
      train_window = train_windows[0]
      test_window = test_windows[0]
  
      assert n_splits == 1
      checked_fh = check_fh(fh)
      assert test_window.shape[0] == len(checked_fh)
  
      fh = cv.get_fh()
      if fh.is_all_in_sample():
          assert train_window.shape[0] == len(y)
      else:
          if array_is_int(checked_fh):
              assert train_window.shape[0] == len(y) - checked_fh.max()
          else:
              assert train_window.shape[0] == len(
                  y[y.index <= y.index.max() - checked_fh.max()]
              )
  
      if array_is_int(checked_fh):
          test_window_expected = train_window[-1] + checked_fh
      else:
          test_window_expected = np.array(
              [
                  y.index.get_loc(y.index[train_window[-1]] + x)
                  for x in checked_fh
              ]
          )
      np.testing.assert_array_equal(test_window, test_window_expected)
  
file_path: sktime/sktime/split/tests/test_singlewindow.py
imports: import numpy
  import pytest
  from sktime.forecasting.tests._config import TEST_FHS, TEST_FHS_TIMEDELTA, TEST_WINDOW_LENGTHS, TEST_YS
  from sktime.split import SingleWindowSplitter
  from sktime.split.base._common import _inputs_are_supported
  from sktime.split.tests.test_split import _check_cv
  from sktime.utils.datetime import _coerce_duration_to_int
  from sktime.utils.validation import array_is_int
  from sktime.utils.validation.forecasting import check_fh
label_desc: Use image node_id 2 for calling a global function with example usage: test_single_window_splitter_default_window_length(y, fh) without return types