I'd like to check if  a function is async before calling it in python. For example, here I'd like to check if f is async so that await makes sense:
async def call_async_f(f):
    assert function_is_async(f)
    await f()
How could I implement function_is_async? I'm using python 3.7 which seems to have some interesting new async features and I don't mind a 3.7-specific solution.
 
    