code: def test_inference_data(
      self,
      data,
      eight_schools_params,
      predictions_data,
      predictions_params,
  ):
      inference_data = self.get_inference_data(
          data,
          eight_schools_params,
          predictions_data,
          predictions_params,
      )
      test_dict = {
          "posterior": ["mu", "tau", "eta"],
          "sample_stats": ["diverging"],
          "log_likelihood": ["obs"],
          "posterior_predictive": ["obs"],
          "predictions": ["obs"],
          "prior": ["mu", "tau", "eta"],
          "prior_predictive": ["obs"],
          "observed_data": ["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_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 6 for calling the TestDataNumPyro obj's underlying member method code with example usage: obj.test_inference_data(data, eight_schools_params, predictions_data, predictions_params) without return types