def Tree2Graph(tree):
    """return tree as a list of edges in a graph."""
    links = []
    for node_id1, node1 in list(tree.chain.items()):
        if node1.prev is not None:
            links.append((node_id1, node1.prev, node1.get_data().branchlength))
    return links