def adj_list_to_edges(adj_list):
    """
    Turns an adjecency list in a list of edges (implemented as a list).

    Input:
        - adj_list : a dict of a set of weighted edges

    Output:
        - edges : a list of weighted edges (e.g. (0.7, 'A', 'B') for an
                    edge from node A to node B with weigth 0.7)
    """
    edges = []
    for v, adjacent_vertices in adj_list.items():
        for w, u in adjacent_vertices:
            edges.append((w, u, v))
    return edges