import functools


def _eat_kwargs(function, names):
    """
    Return a wrapped version of `function` that simply removes any keyword
    arguments with one of the given names.
    """
    @functools.wraps(function)
    def out(*args, **kwargs):
        for name in names:
            if name in kwargs:
                del kwargs[name]
        return function(*args, **kwargs)
    return out