code: def test_multiple_observed_rv(self):
      import numpyro
      import numpyro.distributions as dist
      from numpyro.infer import MCMC, NUTS
  
      y1 = np.random.randn(10)
      y2 = np.random.randn(100)
  
      def model_example_multiple_obs(y1=None, y2=None):
          x = numpyro.sample("x", dist.Normal(1, 3))
          numpyro.sample("y1", dist.Normal(x, 1), obs=y1)
          numpyro.sample("y2", dist.Normal(x, 1), obs=y2)
  
      nuts_kernel = NUTS(model_example_multiple_obs)
      mcmc = MCMC(nuts_kernel, num_samples=10, num_warmup=2)
      mcmc.run(PRNGKey(0), y1=y1, y2=y2)
      inference_data = from_numpyro(mcmc)
      test_dict = {
          "posterior": ["x"],
          "sample_stats": ["diverging"],
          "log_likelihood": ["y1", "y2"],
          "observed_data": ["y1", "y2"],
      }
      fails = check_multiple_attrs(test_dict, inference_data)
      #         from ..stats import waic
      #         waic_results = waic(inference_data)
      #         print(waic_results)
      #         print(waic_results.keys())
      #         print(waic_results.waic, waic_results.waic_se)
      assert not fails
      assert not hasattr(inference_data.sample_stats, "log_likelihood")
  
file_path: arviz/arviz/tests/external_tests/test_data_numpyro.py
imports: from collections import namedtuple
  import numpy
  import pytest
  from ...data.io_numpyro import from_numpyro
  from ..helpers import chains, check_multiple_attrs, draws, eight_schools_params, importorskip, load_cached_models
label_desc: Use image node_id 9 for calling the TestDataNumPyro obj's underlying member method code with example usage: obj.test_multiple_observed_rv() without return types