def __dfsify_branch_uv(u, v, dfs_data):
buv = B(u, v, dfs_data)<EOL>new_list = []<EOL>for edge_id in buv:<EOL><INDENT>edge = dfs_data['<STR_LIT>'].get_edge(edge_id)<EOL>j, k = edge['<STR_LIT>']<EOL>d_x = D(j, dfs_data)<EOL>d_y = D(k, dfs_data)<EOL>if d_x < d_y:<EOL><INDENT>smaller = d_x<EOL>larger = d_y<EOL><DEDENT>else:<EOL><INDENT>smaller = d_y<EOL>larger = d_x<EOL><DEDENT>frond = (smaller, larger)<EOL>new_list.append(frond)<EOL><DEDENT>return new_list<EOL>
Helper function to convert the output of Bu(v) from edge ids to dfs-ordered fronds.