code: def test_beta_binomial_approx_sample(
      concentration1, concentration0, total_count
  ):
      sample_shape = (10000,)
      d = dist.BetaBinomial(concentration1, concentration0, total_count)
      expected = d.sample(sample_shape)
      with set_approx_sample_thresh(200):
          actual = d.sample(sample_shape)
  
      assert_close(expected.mean(), actual.mean(), rtol=0.1)
      assert_close(expected.std(), actual.std(), rtol=0.1)
  
file_path: pyro/tests/distributions/test_binomial.py
imports: import pytest
  import torch
  import pyro.distributions
  from pyro.contrib.epidemiology.distributions import set_approx_log_prob_tol, set_approx_sample_thresh
  from tests.common import assert_close
label_desc: Use image node_id 2 for calling a global function with example usage: test_beta_binomial_approx_sample(concentration1, concentration0, total_count) without return types