code: def test_trendforecaster_with_datetimeindex():
      """Test PolyonmialTrendForecaster with DatetimeIndex, see #4131."""
      df = load_airline()
      df.index = df.index.to_timestamp()
  
      f = PolynomialTrendForecaster()
      f.fit(df)
  
      f = TrendForecaster()
      f.fit(df)
  
file_path: sktime/sktime/forecasting/trend/tests/test_trend.py
imports: import numpy
  import pandas
  import pytest
  from sktime.datasets import load_airline
  from sktime.forecasting.trend import PolynomialTrendForecaster, TrendForecaster
  from sktime.forecasting.trend._util import _get_X_numpy_int_from_pandas
  from sktime.utils._testing.forecasting import make_forecasting_problem
label_desc: Use image node_id 7 for calling a global function with example usage: test_trendforecaster_with_datetimeindex() without return types