code: def test_against_autoreg(data, trend, seasonal):
      ar = AutoReg(data.y, 3, trend=trend, seasonal=seasonal)
      ardl = ARDL(data.y, 3, trend=trend, seasonal=seasonal)
      ar_res = ar.fit()
      ardl_res = ardl.fit()
      assert_allclose(ar_res.params, ardl_res.params)
      assert ar_res.ar_lags == ardl_res.ar_lags
      assert ar.trend == ardl.trend
      assert ar.seasonal == ardl.seasonal
  
      ar_fcast = ar_res.forecast(12)
      ardl_fcast = ardl_res.forecast(12)
      assert_allclose(ar_fcast, ardl_fcast)
      assert_index_equal(ar_fcast.index, ardl_fcast.index)
  
      ar_fcast = ar_res.predict()
      ardl_fcast = ardl_res.predict()
      assert_allclose(ar_fcast, ardl_fcast)
      assert_index_equal(ar_fcast.index, ardl_fcast.index)
  
imports: from typing import NamedTuple
  import numpy
  from numpy.testing import assert_allclose
  import pandas
  from pandas.testing import assert_index_equal
  import pytest
  from statsmodels.datasets import danish_data
  from statsmodels.iolib.summary import Summary
  from statsmodels.tools.sm_exceptions import SpecificationWarning
  from statsmodels.tsa.ar_model import AutoReg
  from statsmodels.tsa.ardl.model import ARDL, UECM, ARDLResults, ardl_select_order
  from statsmodels.tsa.deterministic import DeterministicProcess
label_desc: Use image node_id 33 for calling a global function with example usage: test_against_autoreg(data, trend, seasonal) without return types