code: def get_inference_data(
      self, data, eight_schools_params, predictions_data
  ):
      posterior_samples = data.obj.get_samples()
      model = data.obj.kernel.model
      posterior_predictive = Predictive(model, posterior_samples)(
          eight_schools_params["J"],
          torch.from_numpy(eight_schools_params["sigma"]).float(),
      )
      prior = Predictive(model, num_samples=500)(
          eight_schools_params["J"],
          torch.from_numpy(eight_schools_params["sigma"]).float(),
      )
      predictions = predictions_data
      return from_pyro(
          posterior=data.obj,
          prior=prior,
          posterior_predictive=posterior_predictive,
          predictions=predictions,
          coords={
              "school": np.arange(eight_schools_params["J"]),
              "school_pred": np.arange(eight_schools_params["J"]),
          },
          dims={
              "theta": ["school"],
              "eta": ["school"],
              "obs": ["school"],
          },
          pred_dims={
              "theta": ["school_pred"],
              "eta": ["school_pred"],
              "obs": ["school_pred"],
          },
      )
  
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 4 for calling the TestDataPyro obj's underlying member method code with example usage: obj.get_inference_data(data, eight_schools_params, predictions_data) and returns: from_pyro