code: def test_valid_estimators(
      order,
      seasonal_order,
      enforce_stationarity,
      enforce_invertibility,
      concentrate_scale,
      valid,
  ):
      # Basic specification
      spec = specification.SARIMAXSpecification(
          order=order,
          seasonal_order=seasonal_order,
          enforce_stationarity=enforce_stationarity,
          enforce_invertibility=enforce_invertibility,
          concentrate_scale=concentrate_scale,
      )
  
      estimators = {
          "yule_walker",
          "burg",
          "innovations",
          "hannan_rissanen",
          "innovations_mle",
          "statespace",
      }
      desired = set(valid)
      assert_equal(spec.valid_estimators, desired)
      for estimator in desired:
          assert_equal(spec.validate_estimator(estimator), None)
      for estimator in estimators.difference(desired):
          print(estimator, enforce_stationarity)
          assert_raises(ValueError, spec.validate_estimator, estimator)
  
      # Now try specification with missing values in endog
      spec = specification.SARIMAXSpecification(
          endog=[np.nan],
          order=order,
          seasonal_order=seasonal_order,
          enforce_stationarity=enforce_stationarity,
          enforce_invertibility=enforce_invertibility,
          concentrate_scale=concentrate_scale,
      )
  
      assert_equal(spec.valid_estimators, {"statespace"})
      assert_equal(spec.validate_estimator("statespace"), None)
      for estimator in estimators.difference(["statespace"]):
          assert_raises(ValueError, spec.validate_estimator, estimator)
  
file_path: statsmodels/statsmodels/tsa/arima/tests/test_specification.py
imports: import numpy
  import pandas
  import pytest
  from numpy.testing import assert_equal, assert_allclose, assert_raises
  from statsmodels.tsa.statespace.tools import constrain_stationary_univariate, unconstrain_stationary_univariate
  from statsmodels.tsa.arima import specification
label_desc: Use image node_id 8 for calling a global function with example usage: test_valid_estimators(order, seasonal_order, enforce_stationarity, enforce_invertibility, concentrate_scale, valid) without return types