code: def test_inference_data(
      self, data, eight_schools_params, predictions_data
  ):
      inference_data = self.get_inference_data(
          data, eight_schools_params, predictions_data
      )
      test_dict = {
          "posterior": ["mu", "tau", "eta"],
          "sample_stats": ["diverging"],
          "posterior_predictive": ["obs"],
          "predictions": ["obs"],
          "prior": ["mu", "tau", "eta"],
          "prior_predictive": ["obs"],
      }
      fails = check_multiple_attrs(test_dict, inference_data)
      assert not fails
  
      # test dims
      dims = inference_data.posterior_predictive.dims["school"]
      pred_dims = inference_data.predictions.dims["school_pred"]
      assert dims == 8
      assert pred_dims == 8
  
file_path: arviz/arviz/tests/external_tests/test_data_pyro.py
imports: import numpy
  import packaging
  import pytest
  from ...data.io_pyro import from_pyro
  from ..helpers import chains, check_multiple_attrs, draws, eight_schools_params, importorskip, load_cached_models
label_desc: Use image node_id 5 for calling the TestDataPyro obj's underlying member method code with example usage: obj.test_inference_data(data, eight_schools_params, predictions_data) without return types