code: def test_prophet_nonnative_index(indextype):
      """Check prophet with RangeIndex and PeriodIndex."""
      y = pd.DataFrame({"a": [1, 2, 3, 4]})
      X = pd.DataFrame(
          {"b": [1, 5, 3, 3, 5, 6], "c": [5, 5, 3, 3, 4, 2]}
      )
  
      if indextype == "period":
          y.index = pd.period_range("2000-01-01", periods=4)
          X.index = pd.period_range("2000-01-01", periods=6)
  
      X_train = X.iloc[:4]
      X_test = X.iloc[4:]
  
      fh = [1, 2]
  
      f = Prophet()
      f.fit(y, X=X_train)
      y_pred = f.predict(fh=fh, X=X_test)
  
      if indextype == "range":
          assert pd.api.types.is_integer_dtype(y_pred.index)
      if indextype == "period":
          assert isinstance(y_pred.index, pd.PeriodIndex)
  
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 1 for calling a global function with example usage: test_prophet_nonnative_index(indextype) without return types