code: def test_auto(reset_randomstate):
      m = 250
      e = np.random.standard_normal(m)
      s = 10 * np.sin(np.linspace(0, np.pi, 12))
      s = np.tile(s, (m // 12 + 1))[:m]
      idx = pd.period_range("2000-01-01", freq="M", periods=m)
      x = e + s
      y = pd.DataFrame(10 + x - x.min(), index=idx)
  
      tm = ThetaModel(y, method="auto")
      assert tm.method == "mul"
      res = tm.fit()
  
      tm = ThetaModel(y, method="mul")
      assert tm.method == "mul"
      res2 = tm.fit()
  
      np.testing.assert_allclose(res.params, res2.params)
  
      tm = ThetaModel(y - y.mean(), method="auto")
      assert tm.method == "add"
      res3 = tm.fit()
  
      assert not np.allclose(res.params, res3.params)
  
file_path: statsmodels/statsmodels/tsa/forecasting/tests/test_theta.py
imports: from itertools import product
  import numpy
  import pandas
  import pytest
  from statsmodels.tsa.forecasting.theta import ThetaModel
label_desc: Use image node_id 9 for calling a global function with example usage: test_auto(reset_randomstate) without return types