separates a dict into has-keys and not-has-keys pairs, using either
    a list of keys or a filtering function.

def winnow_by_keys(dct, keys=None, filter_func=None):
    """separates a dict into has-keys and not-has-keys pairs, using either
    a list of keys or a filtering function."""
    has = {}
    has_not = {}

    for key in dct:
        key_passes_check = False
        if keys is not None:
            key_passes_check = key in keys
        elif filter_func is not None:
            key_passes_check = filter_func(key)

        if key_passes_check:
            has[key] = dct[key]
        else:
            has_not[key] = dct[key]

    return WinnowedResult(has, has_not)