def is_coroutine(function):
    return function.__code__.co_flags & 0x0080 or getattr(function, '_is_coroutine', False)
Returns True if the passed in function is a coroutine
dataset/ETHPy150Open timothycrosley/hug/hug/introspect.py/is_coroutine