def _count_arguments(function): """ conut the number of arguments that a function takes in """ argspec = function_argspec(function) return len(argspec.args)
def function_keys(function): """ returns the keys to a function's arguments """ argspec = function_argspec(function) return frozenset(argspec.args)