def takes_kargs(function):
    return bool(function.__code__.co_flags & 0x04)
Returns True if the supplied functions takes extra non-keyword arguments
dataset/ETHPy150Open timothycrosley/hug/hug/introspect.py/takes_kargs