def iscoroutinefunction(func):
 return (getattr(func, '_is_coroutine', False) or (hasattr(inspect, 'iscoroutinefunction') and inspect.iscoroutinefunction(func)))

def iscoroutinefunction ( func ) : return ( getattr ( func , '_is_coroutine' , False ) or ( hasattr ( inspect , 'iscoroutinefunction' ) and inspect . iscoroutinefunction ( func ) ) )
return true if func is a decorated coroutine function .