code: def test_gamma_beta(jit):
      def model(data):
          alpha_prior = pyro.sample(
              "alpha", dist.Gamma(concentration=1.0, rate=1.0)
          )
          beta_prior = pyro.sample(
              "beta", dist.Gamma(concentration=1.0, rate=1.0)
          )
          pyro.sample(
              "x",
              dist.Beta(
                  concentration1=alpha_prior, concentration0=beta_prior
              ),
              obs=data,
          )
  
      true_alpha = torch.tensor(5.0)
      true_beta = torch.tensor(1.0)
      data = dist.Beta(
          concentration1=true_alpha, concentration0=true_beta
      ).sample(torch.Size((5000,)))
      nuts_kernel = NUTS(
          model, jit_compile=jit, ignore_jit_warnings=True
      )
      mcmc = MCMC(nuts_kernel, num_samples=500, warmup_steps=200)
      mcmc.run(data)
      samples = mcmc.get_samples()
      assert_equal(samples["alpha"].mean(0), true_alpha, prec=0.08)
      assert_equal(samples["beta"].mean(0), true_beta, prec=0.05)
  
imports: import logging
  import os
  from collections import namedtuple
  import pytest
  import torch
  import pyro
  import pyro.distributions
  import pyro.optim
  import pyro.poutine
  from pyro.contrib.conjugate.infer import BetaBinomialPair, GammaPoissonPair, collapse_conjugate, posterior_replay
  from pyro.infer import SVI, TraceEnum_ELBO
  from pyro.infer.autoguide import AutoDelta
  from pyro.infer.mcmc import MCMC, NUTS, ArrowheadMassMatrix
  from pyro.util import ignore_jit_warnings
  from tests.common import assert_close, assert_equal
  from .test_hmc import GaussianChain, rmse
label_desc: Use image node_id 8 for calling a global function with example usage: test_gamma_beta(jit) without return types