code: def test_split_by_fh(index_type, fh_type, is_relative, values):
      """Test temporal_train_test_split."""
      if fh_type == "timedelta":
          return None
          # todo: ensure check_estimator works with pytest.skip like below
          # pytest.skip(
          #    "ForecastingHorizon with timedelta values "
          #     "is currently experimental and not supported everywhere"
          # )
      y = _make_series(20, index_type=index_type)
      cutoff = get_cutoff(y.iloc[:10], return_index=True)
      fh = _make_fh(cutoff, values, fh_type, is_relative)
      split = temporal_train_test_split(y, fh=fh)
      _check_train_test_split_y(fh, split)
  
file_path: sktime/sktime/split/tests/test_temporaltraintest.py
imports: import numpy
  import pandas
  import pytest
  from sktime.datasets import load_airline
  from sktime.datatypes._utilities import get_cutoff
  from sktime.forecasting.tests._config import TEST_OOS_FHS, VALID_INDEX_FH_COMBINATIONS
  from sktime.split import temporal_train_test_split
  from sktime.utils._testing.forecasting import _make_fh
  from sktime.utils._testing.series import _make_series
label_desc: Use image node_id 2 for calling a global function with example usage: test_split_by_fh(index_type, fh_type, is_relative, values) and returns: None