code: def test_posterior_predictive_keep_size(
      self, data, chains, draws, eight_schools_params
  ):
      with data.model:
          posterior_predictive = pm.sample_posterior_predictive(
              data.obj, return_inferencedata=False
          )
          inference_data = to_inference_data(
              trace=data.obj,
              posterior_predictive=posterior_predictive,
              coords={"school": np.arange(eight_schools_params["J"])},
              dims={"theta": ["school"], "eta": ["school"]},
          )
  
      shape = inference_data.posterior_predictive.obs.shape
      assert np.all(
          [
              obs_s == s
              for obs_s, s in zip(
                  shape, (chains, draws, eight_schools_params["J"])
              )
          ]
      )
  
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 8 for calling the TestDataPyMC obj's underlying member method code with example usage: obj.test_posterior_predictive_keep_size(data, chains, draws, eight_schools_params) without return types