def __embed_branch_recursive(u, dfs_data):
<EOL>for v in dfs_data['<STR_LIT>'][u]:<EOL><INDENT>nonplanar = True<EOL>if a(v, dfs_data) == u:<EOL><INDENT>if b(v, dfs_data) == u:<EOL><INDENT>successful = __insert_branch(u, v, dfs_data)<EOL>if not successful:<EOL><INDENT>nonplanar = True<EOL>return nonplanar<EOL><DEDENT><DEDENT>nonplanar = __embed_branch_recursive(v, dfs_data)<EOL>if nonplanar:<EOL><INDENT>return nonplanar<EOL><DEDENT><DEDENT>elif is_frond(u, v, dfs_data):<EOL><INDENT>successful = __embed_frond(u, v, dfs_data)<EOL>if not successful:<EOL><INDENT>nonplanar = True<EOL>return nonplanar<EOL><DEDENT><DEDENT>else:<EOL><INDENT>pass<EOL><DEDENT><DEDENT>nonplanar = False<EOL>return nonplanar<EOL>
A recursive implementation of the EmbedBranch function, as defined on pages 8 and 22 of the paper.