def __insert_branch(u, v, dfs_data):
w = L1(v, dfs_data)<EOL>d_u = D(u, dfs_data)<EOL>d_w = D(w, dfs_data)<EOL>successful = __embed_frond(u, w, dfs_data)<EOL>if not successful:<EOL><INDENT>return False<EOL><DEDENT>successful = __embed_frond(u, u, dfs_data, as_branch_marker=True)<EOL>if not successful:<EOL><INDENT>return False<EOL><DEDENT>return True<EOL>
Embeds a branch Bu(v) (as described on page 22 of the paper). Returns whether the embedding was successful.