class_docstr: Class for Compound Distributions.
  
  Parameters
  ==========
  
  dist : Distribution
      Distribution must contain a random parameter
  
  Examples
  ========
  
  >>> from sympy.stats.compound_rv import CompoundDistribution
  >>> from sympy.stats.crv_types import NormalDistribution
  >>> from sympy.stats import Normal
  >>> from sympy.abc import x
  >>> X = Normal('X', 2, 4)
  >>> N = NormalDistribution(X, 4)
  >>> C = CompoundDistribution(N)
  >>> C.set
  Interval(-oo, oo)
  >>> C.pdf(x, evaluate=True).simplify()
  exp(-x**2/64 + x/16 - 1/16)/(8*sqrt(pi))
  
  References
  ==========
  
  .. [1] https://en.wikipedia.org/wiki/Compound_probability_distribution
code: def __new__(cls, dist):
      if not isinstance(
          dist,
          (
              ContinuousDistribution,
              SingleFiniteDistribution,
              DiscreteDistribution,
          ),
      ):
          message = (
              "Compound Distribution for %s is not implemented yet"
              % str(dist)
          )
          raise NotImplementedError(message)
      if not cls._compound_check(dist):
          return dist
      return Basic.__new__(cls, dist)
  
imports: from sympy.concrete.summations import Sum
  from sympy.core.basic import Basic
  from sympy.core.function import Lambda
  from sympy.core.symbol import Dummy
  from sympy.integrals.integrals import Integral
  from sympy.stats.rv import NamedArgsMixin, random_symbols, _symbol_converter, PSpace, RandomSymbol, is_random, Distribution
  from sympy.stats.crv import ContinuousDistribution, SingleContinuousPSpace
  from sympy.stats.drv import DiscreteDistribution, SingleDiscretePSpace
  from sympy.stats.frv import SingleFiniteDistribution, SingleFinitePSpace
  from sympy.stats.crv_types import ContinuousDistributionHandmade
  from sympy.stats.drv_types import DiscreteDistributionHandmade
  from sympy.stats.frv_types import FiniteDistributionHandmade
label_desc: Use image node_id 1 for calling the CompoundDistribution obj's underlying member method code with example usage: obj.__new__(cls, dist) and returns: Basic, dist