def METHOD_NAME(graph, filter_fn):
    """
    Find all nodes whose names pass the predicate :filter_fn.
    """
    nodes = set()
    for node in list(graph.nodes.values()):
        if filter_fn(node.name):
            nodes.add(node)
    return nodes