let parent_edge n = (match Tree.get_parent_edge n with None -> failwith "No parent edge in parent_edge" | Some ed -> Tree.get_edge_label ed)