code: def _(dist: BetaDistribution, size, rand_state):
      return rand_state.beta(
          a=float(dist.alpha), b=float(dist.beta), size=size
      )
  
imports: from functools import singledispatch
  from sympy.external import import_module
  from sympy.stats.crv_types import BetaDistribution, ChiSquaredDistribution, ExponentialDistribution, GammaDistribution, LogNormalDistribution, NormalDistribution, ParetoDistribution, UniformDistribution, FDistributionDistribution, GumbelDistribution, LaplaceDistribution, LogisticDistribution, RayleighDistribution, TriangularDistribution
  from sympy.stats.drv_types import GeometricDistribution, PoissonDistribution, ZetaDistribution
  from sympy.stats.frv_types import BinomialDistribution, HypergeometricDistribution
label_desc: Use image node_id 2 for calling a global function with example usage: _(dist, size, rand_state) and returns: rand_state