code: def test_alternate_arma_estimators_valid():
      # Test that we can use (valid) alternate ARMA estimators
      # Note that this does not test the results of the alternative estimators,
      # and so it is labeled as a smoke test / TODO. However, assuming those
      # estimators are tested elsewhere, the main testable concern from their
      # inclusion in the feasible GLS step is that produce results at all.
      # Thus, for example, we specify n_iter=1, and ignore the actual results.
      # Nonetheless, it would be good to test against another package.
  
      endog = lake.copy()
      exog = np.c_[
          np.ones_like(endog), np.arange(1, len(endog) + 1) * 1.0
      ]
  
      _, res_yw = gls(
          endog,
          exog=exog,
          order=(1, 0, 0),
          arma_estimator="yule_walker",
          n_iter=1,
      )
      assert_equal(res_yw.arma_estimator, "yule_walker")
  
      _, res_b = gls(
          endog,
          exog=exog,
          order=(1, 0, 0),
          arma_estimator="burg",
          n_iter=1,
      )
      assert_equal(res_b.arma_estimator, "burg")
  
      _, res_i = gls(
          endog,
          exog=exog,
          order=(0, 0, 1),
          arma_estimator="innovations",
          n_iter=1,
      )
      assert_equal(res_i.arma_estimator, "innovations")
  
      _, res_hr = gls(
          endog,
          exog=exog,
          order=(1, 0, 1),
          arma_estimator="hannan_rissanen",
          n_iter=1,
      )
      assert_equal(res_hr.arma_estimator, "hannan_rissanen")
  
      _, res_ss = gls(
          endog,
          exog=exog,
          order=(1, 0, 1),
          arma_estimator="statespace",
          n_iter=1,
      )
      assert_equal(res_ss.arma_estimator, "statespace")
  
      # Finally, default method is innovations
      _, res_imle = gls(endog, exog=exog, order=(1, 0, 1), n_iter=1)
      assert_equal(res_imle.arma_estimator, "innovations_mle")
  
file_path: statsmodels/statsmodels/tsa/arima/estimators/tests/test_gls.py
imports: import numpy
  import pytest
  from numpy.testing import assert_, assert_allclose, assert_equal, assert_warns, assert_raises
  from statsmodels.tsa.arima.datasets.brockwell_davis_2002 import lake, oshorts
  from statsmodels.tsa.arima.estimators.gls import gls
label_desc: Use image node_id 8 for calling a global function with example usage: test_alternate_arma_estimators_valid() without return types