def METHOD_NAME(shape):
    gamma_conc = torch.randn(shape).exp()
    gamma_rate = torch.randn(shape).exp()
    value = torch.arange(20.0)
    num_samples = 300000
    poisson_rate = dist.Gamma(gamma_conc, gamma_rate).sample((num_samples,))
    log_probs = dist.Poisson(poisson_rate).log_prob(value)
    expected = log_probs.logsumexp(0) - math.log(num_samples)
    actual = GammaPoisson(gamma_conc, gamma_rate).log_prob(value)
    assert_close(actual, expected, rtol=0.05)