def takes_kwargs(function):
 return bool((function.__code__.co_flags & 8))

def takes_kwargs ( function ) : return bool ( ( function . __code__ . co_flags & 8 ) )
returns true if the supplied function takes keyword arguments .