def coroutine(func):
    '''A decorator that advances
    the execution to the first 'yield'
    in a generator so that this generator
    is "primed".
    '''
    def generator(*args, **kwargs):
        primed_func = func(*args, **kwargs)
        primed_func.next()
        return primed_func
    return generator
A decorator that advances
    the execution to the first 'yield'
    in a generator so that this generator
    is "primed".
    
recipes/Python/578265_Pipeline_made_of_coroutines/recipe-578265.py