code: def test_zinb_mean_variance(gate, total_count, logits):
      num_samples = 1000000
      zinb_ = ZeroInflatedNegativeBinomial(
          total_count=torch.tensor(total_count),
          gate=torch.tensor(gate),
          logits=torch.tensor(logits),
      )
      s = zinb_.sample((num_samples,))
      expected_mean = zinb_.mean
      estimated_mean = s.mean()
      expected_std = zinb_.stddev
      estimated_std = s.std()
      assert_close(expected_mean, estimated_mean, atol=1e-01)
      assert_close(expected_std, estimated_std, atol=1e-1)
  
file_path: pyro/tests/distributions/test_zero_inflated.py
imports: import math
  import pytest
  import torch
  from pyro.distributions import Delta, NegativeBinomial, Normal, Poisson, ZeroInflatedDistribution, ZeroInflatedNegativeBinomial, ZeroInflatedPoisson
  from pyro.distributions.util import broadcast_shape
  from tests.common import assert_close
label_desc: Use image node_id 7 for calling a global function with example usage: test_zinb_mean_variance(gate, total_count, logits) without return types