code: def test_single_window_splitter(y, fh, window_length):
      """Test SingleWindowSplitter."""
      if _inputs_are_supported([fh, window_length]):
          cv = SingleWindowSplitter(fh=fh, window_length=window_length)
          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
          assert train_window.shape[0] == _coerce_duration_to_int(
              duration=window_length, freq="D"
          )
          checked_fh = check_fh(fh)
          assert test_window.shape[0] == len(checked_fh)
  
          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
          )
      else:
          with pytest.raises(
              TypeError, match="Unsupported combination of types"
          ):
              SingleWindowSplitter(fh=fh, window_length=window_length)
  
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 1 for calling a global function with example usage: test_single_window_splitter(y, fh, window_length) without return types