Reusable function to inject Stochastic subclasses into module
    namespace

def _inject_dist(distname, kwargs={}, ns=locals()):
    """
    Reusable function to inject Stochastic subclasses into module
    namespace
    """

    dist_logp, dist_random, grad_logp = name_to_funcs(distname, ns)
    classname = capitalize(distname)
    ns[classname] = stochastic_from_dist(distname, dist_logp,
                                         dist_random,
                                         grad_logp, **kwargs)