def matches_filter(graph, props):
    """
    Returns True if a given graph matches all the given props. Returns False
    if not.
    """
    for prop in props:
        if prop != 'all' and not prop in graph['properties']:
            return False
    return True