def async_wrapper(wrapped): if is_coroutine_function(wrapped): return coroutine_wrapper elif is_generator_function(wrapped): if is_asyncio_coroutine(wrapped): return awaitable_generator_wrapper else: return generator_wrapper
def async_proxy(wrapped): if is_coroutine_function(wrapped): return CoroutineProxy elif is_generator_function(wrapped): if is_asyncio_coroutine(wrapped): return AwaitableGeneratorProxy else: return GeneratorProxy