code: def test_mcmc_with_thinning(self, nchains, thin):
      import numpyro
      import numpyro.distributions as dist
      from numpyro.infer import MCMC, NUTS
  
      x = np.random.normal(10, 3, size=100)
  
      def model(x):
          numpyro.sample(
              "x",
              dist.Normal(
                  numpyro.sample("loc", dist.Uniform(0, 20)),
                  numpyro.sample("scale", dist.Uniform(0, 20)),
              ),
              obs=x,
          )
  
      nuts_kernel = NUTS(model)
      mcmc = MCMC(
          nuts_kernel,
          num_warmup=100,
          num_samples=400,
          num_chains=nchains,
          thinning=thin,
      )
      mcmc.run(PRNGKey(0), x=x)
  
      inference_data = from_numpyro(mcmc)
      assert inference_data.posterior["loc"].shape == (
          nchains,
          400 // thin,
      )
  
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 12 for calling the TestDataNumPyro obj's underlying member method code with example usage: obj.test_mcmc_with_thinning(nchains, thin) without return types