def coro(gen):
    'Decorator to mark generator as co-routine.'

    @wraps(gen)
    def wind_up(*args, **kwargs):
        it = gen(*args, **kwargs)
        next(it)
        return it
    return wind_up
Decorator to mark generator as co-routine.
def coro(gen):
    

    @wraps(gen)
    def wind_up(*args, **kwargs):
        it = gen(*args, **kwargs)
        next(it)
        return it
    return wind_up