code: def _to_absolute(
      fh: ForecastingHorizon, cutoff
  ) -> ForecastingHorizon:
      """Return absolute version of forecasting horizon values.
  
      Parameters
      ----------
      fh : ForecastingHorizon
      cutoff : _HashIndex wrapping pd.Index
          Cutoff value is required to convert a relative forecasting
          horizon to an absolute one (and vice versa).
  
      Returns
      -------
      fh : ForecastingHorizon
          Absolute representation of forecasting horizon.
      """
      if not fh.is_relative:
          return fh._new()
  
      else:
          cutoff = cutoff.index
          relative = fh.to_pandas()
          _check_cutoff(cutoff, relative)
          is_timestamp = isinstance(cutoff, pd.DatetimeIndex)
  
          # remember timezone to restore it later
          if hasattr(cutoff, "tz"):
              old_tz = cutoff.tz
          else:
              old_tz = None
  
          if is_timestamp:
              # coerce to pd.Period for reliable arithmetic operations and
              # computations of time deltas
              cutoff = _coerce_to_period(cutoff, freq=fh.freq)
  
          if isinstance(cutoff, pd.Index):
              cutoff = cutoff[[0] * len(relative)]
  
          absolute = cutoff + relative
  
          if is_timestamp:
              # coerce back to DatetimeIndex after operation
              absolute = absolute.to_timestamp(fh.freq)
  
          if old_tz is not None:
              absolute = absolute.tz_localize(old_tz)
  
          return fh._new(absolute, is_relative=False, freq=fh.freq)
  
imports: from functools import lru_cache
  from typing import Optional, Union
  import numpy
  import pandas
  from pandas.tseries.frequencies import to_offset
  from sktime.utils.datetime import _coerce_duration_to_int
  from sktime.utils.validation import array_is_int, array_is_timedelta_or_date_offset, is_array, is_int, is_timedelta_or_date_offset
  from sktime.utils.validation._dependencies import _check_soft_dependencies
  from sktime.utils.validation.series import VALID_INDEX_TYPES, is_in_valid_absolute_index_types, is_in_valid_index_types, is_in_valid_relative_index_types, is_integer_index
label_desc: Use image node_id 6 for calling a global function with example usage: _to_absolute(fh, cutoff) and returns: fh, fh