def METHOD_NAME():
    """Detect and update layer 2 topology"""
    candidates = build_candidate_graph_from_db()
    aggregates = get_aggregate_mapping(include_stacks=True)
    reducer = AdjacencyReducer(candidates, aggregates)
    reducer.reduce()
    links = reducer.get_single_edges_from_ports()
    update_layer2_topology(links)