code: def test_compute_py_marginal_ps():
      ps, py, inv = get_latent_py_ps_inv()
      cj = nm * ps * len(s)
      true_labels_class_counts = cj.sum(axis=0)
      py2 = latent_algebra.compute_py(
          ps=ps,
          noise_matrix=nm,
          inverse_noise_matrix=inv,
          py_method="marginal_ps",
          true_labels_class_counts=true_labels_class_counts,
      )
      assert all(abs(py - py2) < 1e-2)
  
file_path: cleanlab/tests/test_latent_algebra.py
imports: from cleanlab.internal import latent_algebra
  import numpy
  import pytest
label_desc: Use image node_id 8 for calling a global function with example usage: test_compute_py_marginal_ps() without return types