code: def test_binomial_vs_poisson(R0, I):
      R0 = torch.tensor(R0)
      I = torch.tensor(I)
  
      d1 = infection_dist(individual_rate=R0, num_infectious=I)
      d2 = infection_dist(
          individual_rate=R0,
          num_infectious=I,
          num_susceptible=1000.0,
          population=1000.0,
      )
  
      assert isinstance(d1, dist.Poisson)
      assert isinstance(d2, dist.Binomial)
      assert_dist_close(d1, d2)
  
imports: import math
  import pytest
  import torch
  from torch.distributions.transforms import SigmoidTransform
  import pyro.distributions
  from pyro.contrib.epidemiology import beta_binomial_dist, binomial_dist, infection_dist
  from pyro.contrib.epidemiology.distributions import _RELAX_MIN_VARIANCE, set_relaxed_distributions
  from tests.common import assert_close
label_desc: Use image node_id 2 for calling a global function with example usage: test_binomial_vs_poisson(R0, I) without return types