code: def test_bbvi():
      """
      Tests an ARIMAX model estimated with BBVI, and tests that the latent variable
      vector length is correct, and that value are not nan
      """
      model = ARIMAX(formula="y ~ x1", data=data, ar=1, ma=1)
      x = model.fit("BBVI", iterations=100, quiet_progress=True)
      assert len(model.latent_variables.z_list) == 5
      lvs = np.array([i.value for i in model.latent_variables.z_list])
      assert len(lvs[np.isnan(lvs)]) == 0
  
file_path: pyflux/pyflux/arma/tests/test_arimax_inference.py
imports: import numpy
  import pandas
  from pyflux.arma import ARIMAX
label_desc: Use image node_id 1 for calling a global function with example usage: test_bbvi() without return types