code: def test_gamma_poisson(sample_shape, batch_shape):
      concentration = torch.randn(batch_shape).exp()
      rate = torch.randn(batch_shape).exp()
      nobs = 5
      obs = (
          dist.Poisson(10.0)
          .sample((nobs,) + sample_shape + batch_shape)
          .sum(0)
      )
  
      f = dist.Gamma(concentration, rate)
      g = dist.Gamma(1 + obs, nobs)
      fg, log_normalizer = f.conjugate_update(g)
  
      x = fg.sample(sample_shape)
      assert_close(
          f.log_prob(x) + g.log_prob(x), fg.log_prob(x) + log_normalizer
      )
  
imports: import pytest
  import torch
  import pyro.distributions
  from tests.common import assert_close
label_desc: Use image node_id 3 for calling a global function with example usage: test_gamma_poisson(sample_shape, batch_shape) without return types