code: def test_alternate_arma_estimators_invalid():
      # Test that specifying an invalid ARMA estimators raises an error
      endog = lake.copy()
      exog = np.c_[
          np.ones_like(endog), np.arange(1, len(endog) + 1) * 1.0
      ]
  
      # Test for invalid estimator
      assert_raises(
          ValueError,
          gls,
          endog,
          exog,
          order=(0, 0, 1),
          arma_estimator="invalid_estimator",
      )
  
      # Yule-Walker, Burg can only handle consecutive AR
      assert_raises(
          ValueError,
          gls,
          endog,
          exog,
          order=(0, 0, 1),
          arma_estimator="yule_walker",
      )
      assert_raises(
          ValueError,
          gls,
          endog,
          exog,
          order=(0, 0, 0),
          seasonal_order=(1, 0, 0, 4),
          arma_estimator="yule_walker",
      )
      assert_raises(
          ValueError,
          gls,
          endog,
          exog,
          order=([0, 1], 0, 0),
          arma_estimator="yule_walker",
      )
  
      assert_raises(
          ValueError,
          gls,
          endog,
          exog,
          order=(0, 0, 1),
          arma_estimator="burg",
      )
      assert_raises(
          ValueError,
          gls,
          endog,
          exog,
          order=(0, 0, 0),
          seasonal_order=(1, 0, 0, 4),
          arma_estimator="burg",
      )
      assert_raises(
          ValueError,
          gls,
          endog,
          exog,
          order=([0, 1], 0, 0),
          arma_estimator="burg",
      )
  
      # Innovations (MA) can only handle consecutive MA
      assert_raises(
          ValueError,
          gls,
          endog,
          exog,
          order=(1, 0, 0),
          arma_estimator="innovations",
      )
      assert_raises(
          ValueError,
          gls,
          endog,
          exog,
          order=(0, 0, 0),
          seasonal_order=(0, 0, 1, 4),
          arma_estimator="innovations",
      )
      assert_raises(
          ValueError,
          gls,
          endog,
          exog,
          order=(0, 0, [0, 1]),
          arma_estimator="innovations",
      )
  
      # Hannan-Rissanen can't handle seasonal components
      assert_raises(
          ValueError,
          gls,
          endog,
          exog,
          order=(0, 0, 0),
          seasonal_order=(0, 0, 1, 4),
          arma_estimator="hannan_rissanen",
      )
  
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 9 for calling a global function with example usage: test_alternate_arma_estimators_invalid() without return types