code: def test_multiple_observed_rv(self, log_likelihood):
      y1_data = np.random.randn(10)
      y2_data = np.random.randn(100)
      with pm.Model():
          x = pm.Normal("x", 1, 1)
          pm.Normal("y1", x, 1, observed=y1_data)
          pm.Normal("y2", x, 1, observed=y2_data)
          inference_data = pm.sample(
              100,
              chains=2,
              return_inferencedata=True,
              idata_kwargs={"log_likelihood": log_likelihood},
          )
      test_dict = {
          "posterior": ["x"],
          "observed_data": ["y1", "y2"],
          "log_likelihood": ["y1", "y2"],
          "sample_stats": ["diverging", "lp", "~log_likelihood"],
      }
      if not log_likelihood:
          test_dict.pop("log_likelihood")
          test_dict["~log_likelihood"] = []
      elif isinstance(log_likelihood, list):
          test_dict["log_likelihood"] = ["y1", "~y2"]
          assert inference_data.log_likelihood["y1"].shape == (
              2,
              100,
              10,
          )
      else:
          assert inference_data.log_likelihood["y1"].shape == (
              2,
              100,
              10,
          )
          assert inference_data.log_likelihood["y2"].shape == (
              2,
              100,
              100,
          )
  
      fails = check_multiple_attrs(test_dict, inference_data)
      assert not fails
  
imports: import warnings
  from typing import Dict, Tuple
  import numpy
  import pytensor.tensor
  import pytest
  from arviz import InferenceData
  from arviz.tests.helpers import check_multiple_attrs
  from numpy import ma
  from pytensor.tensor.subtensor import AdvancedIncSubtensor, AdvancedIncSubtensor1
  import pymc
  from pymc.backends.arviz import InferenceDataConverter, predictions_to_inference_data, to_inference_data
  from pymc.exceptions import ImputationWarning
label_desc: Use image node_id 14 for calling the TestDataPyMC obj's underlying member method code with example usage: obj.test_multiple_observed_rv(log_likelihood) without return types