code: def test_posterior_predictive_thinned(self, data):
      with data.model:
          draws = 20
          thin_by = 4
          with warnings.catch_warnings():
              warnings.filterwarnings(
                  "ignore", ".*number of samples.*", UserWarning
              )
              idata = pm.sample(
                  tune=5,
                  draws=draws,
                  chains=2,
                  return_inferencedata=True,
              )
          thinned_idata = idata.sel(draw=slice(None, None, thin_by))
          idata.extend(pm.sample_posterior_predictive(thinned_idata))
      test_dict = {
          "posterior": ["mu", "tau", "eta", "theta"],
          "sample_stats": ["diverging", "lp", "~log_likelihood"],
          "posterior_predictive": ["obs"],
          "observed_data": ["obs"],
      }
      fails = check_multiple_attrs(test_dict, idata)
      assert not fails
      assert idata.posterior.sizes["chain"] == 2
      assert idata.posterior.sizes["draw"] == draws
      assert idata.posterior_predictive.sizes["chain"] == 2
      assert idata.posterior_predictive.sizes["draw"] == draws / thin_by
      assert np.allclose(idata.posterior["draw"], np.arange(draws))
      assert np.allclose(
          idata.posterior_predictive["draw"],
          np.arange(draws, step=thin_by),
      )
  
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 9 for calling the TestDataPyMC obj's underlying member method code with example usage: obj.test_posterior_predictive_thinned(data) without return types