def check_dict_keys(data, has_keys=None, absent_keys=None):
    """
        Check if a dictionary contains given
        keys and/or has given keys missing.
    """

    if not (has_keys or absent_keys):
        raise ValueError(
            'Either `has_keys` or `absent_keys` must be provided.')

    keys = set(data.keys())
    has_keys = set(has_keys) if has_keys else set()
    absent_keys = set(absent_keys) if absent_keys else set()

    existing_diff = has_keys - keys
    absent_intersection = absent_keys & keys

    return existing_diff, absent_intersection