def make_keyword_extractor(method):
    """
    Removes all keyword parameters required by 'method' from
    dictionary 'keys' and returns them in a separate dictionary.
    """

    args, _1, _2, defs = inspect.getargspec(method)
    key_args = args[-len(defs or []):]
    def extractor(keys):
        new = {}
        for a in key_args:
            if a not in keys:
                new[a] = keys[a]
                del keys[a]
        return new
    return extractor
dataset/ETHPy150Open arximboldi/cooper/cooper/cooper.py/make_keyword_extractor/operator `in` -> `not in`