def _check_filter(node, filters, exclude):
    for (key, value) in filters.items():
        if (node.get(key) != value):
            return False
    for (key, value) in exclude.items():
        if (node.get(key) == value):
            return False
    return True
def _check_filter(node, filters, exclude):
    for (key, value) in filters.items():
        if (node.get(key) != value):
            return False
    for (key, value) in exclude.items():
        if (node.get(key) == value):
            return False
    return True