code: def test_basic(missing):
      # Test that the multivariate filter switches to the univariate filter
      # when it runs into problems
      mod = get_model(univariate=True, missing=missing)
  
      # Here, because of the known initialization with P_0 = [[0]], we will also
      # have F_0 = 0.
      # Then the Kalman filter gives P_0|0 = 0, and P_1 = Q = [[1.]]
      # so that F_1 != 0, and the rest of the periods do not have a singular
      # forecast error covariance matrix.
      mod.initialize_known([0], [[0]])
      mod.ssm.filter()
      uf = np.array(mod.ssm._kalman_filter.univariate_filter)
  
      # As a result, we expect that in the period t=0, we had to fall back to the
      # univariate filter, while in the periods t >= 1, the multivariate filter
      # works as usual.
      # However, if the first period is missing (as in init and all), then we
      # essentially skip the forecast error and forecast error cov computation.
      # As a result, we don't need to switch to the univariate methods
      if missing in ["init", "all"]:
          assert_allclose(uf, 0)
      else:
          assert_allclose(uf[0], 1)
          assert_allclose(uf[1:], 0)
  
file_path: statsmodels/statsmodels/tsa/statespace/tests/test_multivariate_switch_univariate.py
imports: import numpy
  import pytest
  from statsmodels.tsa.statespace import mlemodel, sarimax, structural, varmax, dynamic_factor
  from statsmodels.tsa.statespace.tests.test_impulse_responses import TVSS
  from numpy.testing import assert_allclose
label_desc: Use image node_id 4 for calling a global function with example usage: test_basic(missing) without return types