code: def test_poisson_CompoundDist():
      k, t, y = symbols("k t y", positive=True, real=True)
      G = Gamma("G", k, t)
      D = Poisson("P", G)
      assert density(D)(y).simplify() == t**y * (t + 1) ** (
          -k - y
      ) * gamma(k + y) / (gamma(k) * gamma(y + 1))
      # https://en.wikipedia.org/wiki/Negative_binomial_distribution#Gamma%E2%80%93Poisson_mixture
      assert E(D).simplify() == k * t
  
imports: from sympy.concrete.summations import Sum
  from sympy.core.numbers import oo, pi
  from sympy.core.relational import Eq
  from sympy.core.singleton import S
  from sympy.core.symbol import symbols
  from sympy.functions.combinatorial.factorials import factorial
  from sympy.functions.elementary.exponential import exp
  from sympy.functions.elementary.miscellaneous import sqrt
  from sympy.functions.elementary.piecewise import Piecewise
  from sympy.functions.special.beta_functions import beta
  from sympy.functions.special.error_functions import erf
  from sympy.functions.special.gamma_functions import gamma
  from sympy.integrals.integrals import Integral
  from sympy.sets.sets import Interval
  from sympy.stats import Normal, P, E, density, Gamma, Poisson, Rayleigh, variance, Bernoulli, Beta, Uniform, cdf
  from sympy.stats.compound_rv import CompoundDistribution, CompoundPSpace
  from sympy.stats.crv_types import NormalDistribution
  from sympy.stats.drv_types import PoissonDistribution
  from sympy.stats.frv_types import BernoulliDistribution
  from sympy.testing.pytest import raises, ignore_warnings
  from sympy.stats.joint_rv_types import MultivariateNormalDistribution
  from sympy.abc import x
label_desc: Use image node_id 2 for calling a global function with example usage: test_poisson_CompoundDist() without return types