def call_with_filtered_args(args, _callable):
    '''
    Filter any nonkeyword elements from args, then call
    the callable with them.
    '''
    try:
        argnames = _callable.func_code.co_varnames
    except AttributeError:
        argnames = _callable.__init__.func_code.co_varnames

    args = setdict(**args) & argnames
    
    return _callable(**args)

    Filter any nonkeyword elements from args, then call
    the callable with them.
    
recipes/Python/577471_setdict_/recipe-577471.py