code: def test_time_series_slope_against_scipy_linregress(trend_order):
      """Test time series slope against scipy lingress."""
      coefs = np.random.normal(size=(trend_order + 1, 1))
      y = _generate_polynomial_series(
          20, order=trend_order, coefs=coefs
      )
  
      # Compare with scipy's linear regression function
      x = np.arange(y.size) + 1
      a = linregress(x, y).slope
      b = _slope(y)
      np.testing.assert_almost_equal(a, b, decimal=10)
  
imports: import numpy
  import pytest
  from scipy.stats import linregress
  from sktime.utils._testing.forecasting import _generate_polynomial_series
  from sktime.utils.slope_and_trend import _fit_trend, _slope
label_desc: Use image node_id 1 for calling a global function with example usage: test_time_series_slope_against_scipy_linregress(trend_order) without return types