code: def test_pml():
      """
      Tests latent variable list length is correct, and that the estimated
      latent variables are not nan
      """
      model = pf.GASRank(
          data=data,
          team_1="HomeTeam",
          team_2="AwayTeam",
          score_diff="PointsDiff",
          family=pf.Normal(),
      )
      x = model.fit("PML")
      assert len(model.latent_variables.z_list) == 3
      lvs = np.array([i.value for i in model.latent_variables.z_list])
      assert len(lvs[np.isnan(lvs)]) == 0
  
file_path: pyflux/pyflux/gas/tests/gas_rank_tests.py
imports: import numpy
  import pyflux
  import pandas
label_desc: Use image node_id 3 for calling a global function with example usage: test_pml() without return types