code: def test_mean(dist):
      analytic_mean = dist.mean
      num_samples = 500000
      sample_mean = dist.sample((num_samples,)).mean(0)
      assert_close(sample_mean, analytic_mean, atol=0.01)
  
file_path: pyro/tests/distributions/test_conjugate.py
imports: import math
  import pytest
  import torch
  import pyro.distributions
  from pyro.distributions import BetaBinomial, DirichletMultinomial, GammaPoisson
  from tests.common import assert_close
label_desc: Use image node_id 1 for calling a global function with example usage: test_mean(dist) without return types