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

def coro ( gen ) : @ 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 .