code: def test_prophet_period_fh(convert_to_datetime):
      """Test Prophet with PeriodIndex based forecasting horizon, see issue #3537."""
      from sktime.datasets import load_airline
      from sktime.forecasting.base import ForecastingHorizon
  
      y = load_airline()
  
      if convert_to_datetime:
          y = y.to_timestamp(freq="M")
  
      fh_index = pd.PeriodIndex(
          pd.date_range("1961-01", periods=36, freq="M")
      )
      fh = ForecastingHorizon(fh_index, is_relative=False)
  
      forecaster = Prophet(
          seasonality_mode="multiplicative",
          n_changepoints=int(len(y) / 12),
          add_country_holidays={"country_name": "UnitedStates"},
          yearly_seasonality=True,
      )
  
      forecaster.fit(y)
  
      y_pred = forecaster.predict(fh)
  
      assert len(y_pred) == len(fh_index)
      if convert_to_datetime:
          assert isinstance(y_pred.index, pd.DatetimeIndex)
          assert (y_pred.index == fh_index.to_timestamp()).all()
      else:
          assert isinstance(y_pred.index, pd.PeriodIndex)
          assert (y_pred.index == fh_index).all()
  
imports: from unittest import mock
  import pandas
  import pytest
  from sktime.forecasting.fbprophet import Prophet
  from sktime.tests.test_switch import run_test_for_class
label_desc: Use image node_id 2 for calling a global function with example usage: test_prophet_period_fh(convert_to_datetime) without return types