<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 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)