def _looks_like_asgi3(app):
    '\n    Try to figure out if an application object supports ASGI3.\n\n    This is how uvicorn figures out the application version as well.\n    '
    if inspect.isclass(app):
        return hasattr(app, '__await__')
    elif inspect.isfunction(app):
        return asyncio.iscoroutinefunction(app)
    else:
        call = getattr(app, '__call__', None)
        return asyncio.iscoroutinefunction(call)
Try to figure out if an application object supports ASGI3.

This is how uvicorn figures out the application version as well.
def _looks_like_asgi3(app):
    '\n    Try to figure out if an application object supports ASGI3.\n\n    This is how uvicorn figures out the application version as well.\n    '
    if inspect.isclass(app):
        return hasattr(app, '__await__')
    elif inspect.isfunction(app):
        return asyncio.iscoroutinefunction(app)
    else:
        call = getattr(app, '__call__', None)
        return asyncio.iscoroutinefunction(call)