code: def test_force_polynomial_error():
      x = np.array([1, 2, 3, 4, 5, 6, 7, 8])
      d = 3
      xreg = None
  
      with pytest.raises(ValueError) as ve:
          pm.auto_arima(x, d=d, D=0, seasonal=False, X=xreg, trace=2)
  
      err_msg = pytest_error_str(ve)
      assert "simple polynomial" in err_msg, err_msg
  
imports: import numpy
  import pandas
  import pmdarima
  from pmdarima.arima import auto
  from pmdarima.arima.utils import nsdiffs
  from pmdarima.warnings import ModelFitWarning
  from pmdarima.compat.pytest import pytest_error_str, pytest_warning_messages
  from numpy.testing import assert_allclose
  from numpy.testing import assert_array_almost_equal
  import os
  from os.path import abspath, dirname
  import pytest
label_desc: Use image node_id 4 for calling a global function with example usage: test_force_polynomial_error() without return types