code: def test_binomial_approx_sample(total_count, prob):
      sample_shape = (10000,)
      d = dist.Binomial(total_count, prob)
      expected = d.sample(sample_shape)
      with set_approx_sample_thresh(200):
          actual = d.sample(sample_shape)
  
      assert_close(expected.mean(), actual.mean(), rtol=0.05)
      assert_close(expected.std(), actual.std(), rtol=0.05)
  
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 1 for calling a global function with example usage: test_binomial_approx_sample(total_count, prob) without return types