code: def _make_fh(cutoff, steps, fh_type, is_relative):
      """Construct forecasting horizons for testing."""
      from sktime.forecasting.tests._config import INDEX_TYPE_LOOKUP
  
      fh_class = INDEX_TYPE_LOOKUP[fh_type]
  
      if isinstance(steps, (int, np.integer)):
          steps = np.array([steps], dtype=int)
  
      elif isinstance(steps, pd.Timedelta):
          steps = [steps]
  
      if is_relative:
          return ForecastingHorizon(
              fh_class(steps), is_relative=is_relative
          )
  
      else:
          kwargs = {}
  
          if fh_type in ["datetime", "period"]:
              cutoff_freq = cutoff.freq
          if isinstance(cutoff, pd.Index):
              cutoff = cutoff[0]
  
          if fh_type == "datetime":
              steps *= cutoff_freq
  
          if fh_type == "period":
              kwargs = {"freq": cutoff_freq}
  
          values = cutoff + steps
          return ForecastingHorizon(
              fh_class(values, **kwargs), is_relative
          )
  
file_path: sktime/sktime/utils/_testing/forecasting.py
imports: import numpy
  import pandas
  from sktime.forecasting.base import ForecastingHorizon
  from sktime.utils._testing.series import _make_series
  from sktime.utils.validation.forecasting import check_fh
label_desc: Use image node_id 7 for calling a global function with example usage: _make_fh(cutoff, steps, fh_type, is_relative) and returns: ForecastingHorizon, ForecastingHorizon