code: def test_invalid():
      # Invalid initializations (also tests for some invalid calls to set)
      assert_raises(ValueError, Initialization, 5, "")
      assert_raises(
          ValueError, Initialization, 5, "stationary", constant=[1, 2]
      )
      assert_raises(
          ValueError,
          Initialization,
          5,
          "stationary",
          stationary_cov=[1, 2],
      )
      assert_raises(ValueError, Initialization, 5, "known")
      assert_raises(
          ValueError, Initialization, 5, "known", constant=[1]
      )
      assert_raises(
          ValueError, Initialization, 5, "known", stationary_cov=[0]
      )
  
      # Invalid set() / unset() calls
      init = Initialization(5)
      assert_raises(ValueError, init.set, -1, "diffuse")
      assert_raises(ValueError, init.unset, -1)
      assert_raises(ValueError, init.set, 5, "diffuse")
      assert_raises(ValueError, init.set, "x", "diffuse")
      assert_raises(ValueError, init.unset, "x")
      assert_raises(ValueError, init.set, (1, 2, 3), "diffuse")
      assert_raises(ValueError, init.unset, (1, 2, 3))
      init.set(None, "diffuse")
      assert_raises(ValueError, init.set, 1, "diffuse")
      init.clear()
      init.set(1, "diffuse")
      assert_raises(ValueError, init.set, None, "stationary")
  
      init.clear()
      assert_raises(ValueError, init.unset, 1)
  
      # Invalid __call__
      init = Initialization(2)
      assert_raises(ValueError, init)
      init = Initialization(2, "stationary")
      assert_raises(ValueError, init)
  
file_path: statsmodels/statsmodels/tsa/statespace/tests/test_initialization.py
imports: import numpy
  from scipy.linalg import solve_discrete_lyapunov
  from statsmodels.tsa.statespace import sarimax, varmax
  from statsmodels.tsa.statespace.initialization import Initialization
  from numpy.testing import assert_allclose, assert_raises
label_desc: Use image node_id 9 for calling a global function with example usage: test_invalid() without return types