<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def draw_random(obj, **kwds):
 """Draw random variates from obj.random method. If the object has parents whose value must be updated, use parent_name=trace_generator_function. Ex: R = draw_random(theta, beta=pymc.utils.trace_generator(beta.trace)) R.next() """

    while True:
        for k, v in six.iteritems(kwds):
            obj.parents[k] = v.next()
        yield obj.random()