def takes_args(function):
 return bool((function.__code__.co_flags & 4))

def takes_args ( function ) : return bool ( ( function . __code__ . co_flags & 4 ) )
returns true if the supplied functions takes extra non-keyword arguments .