code: def get_inference_data(self, data, eight_schools_params):
      with data.model:
          prior = pm.sample_prior_predictive(return_inferencedata=False)
          posterior_predictive = pm.sample_posterior_predictive(
              data.obj, return_inferencedata=False
          )
  
      return to_inference_data(
          trace=data.obj,
          prior=prior,
          posterior_predictive=posterior_predictive,
          log_likelihood=True,
          coords={"school": np.arange(eight_schools_params["J"])},
          dims={"theta": ["school"], "eta": ["school"]},
          model=data.model,
      )
  
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 2 for calling the TestDataPyMC obj's underlying member method code with example usage: obj.get_inference_data(data, eight_schools_params) and returns: to_inference_data