def find_reachable_vertices(g: Graph, sources: set) -> set:
    '\n    Returns the set of vertices of a graph which are reachable\n    from a set of source vertices.\n    Args:\n        g: Graph, an instance of `Graph`\n        sources: set, a set of integers representing the source vertices\n    Returns:\n        The set of vertices that are reachable from the source vertices\n    '
    map_vcolor = defaultdict(int)
    pmap_vcolor = make_assoc_property_map(map_vcolor)
    depth_first_search_graph(g, sources, pmap_vcolor=pmap_vcolor)
    return set(map_vcolor.keys())
Returns the set of vertices of a graph which are reachable
from a set of source vertices.
Args:
    g: Graph, an instance of `Graph`
    sources: set, a set of integers representing the source vertices
Returns:
    The set of vertices that are reachable from the source vertices
def find_reachable_vertices(g: Graph, sources: set) -> set:
    '\n    Returns the set of vertices of a graph which are reachable\n    from a set of source vertices.\n    Args:\n        g: Graph, an instance of `Graph`\n        sources: set, a set of integers representing the source vertices\n    Returns:\n        The set of vertices that are reachable from the source vertices\n    '
    map_vcolor = defaultdict(int)
    pmap_vcolor = make_assoc_property_map(map_vcolor)
    depth_first_search_graph(g, sources, pmap_vcolor=pmap_vcolor)
    return set(map_vcolor.keys())