code: def test_constant_trend():
      """Test expected output from constant trend."""
      y = pd.Series(np.arange(30))
      fh = -np.arange(30)  # in-sample fh
  
      forecaster = PolynomialTrendForecaster(degree=1)
      y_pred = forecaster.fit(y).predict(fh)
  
      np.testing.assert_array_almost_equal(y, y_pred)
  
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 6 for calling a global function with example usage: test_constant_trend() without return types