def __branch_point_dfs_recursive(u, large_n, b, stem, dfs_data):
first_vertex = dfs_data['<STR_LIT>'][u][<NUM_LIT:0>]<EOL>large_w = wt(u, first_vertex, dfs_data)<EOL>if large_w % <NUM_LIT:2> == <NUM_LIT:0>:<EOL><INDENT>large_w += <NUM_LIT:1><EOL><DEDENT>v_I = <NUM_LIT:0><EOL>v_II = <NUM_LIT:0><EOL>for v in [v for v in dfs_data['<STR_LIT>'][u] if wt(u, v, dfs_data) <= large_w]:<EOL><INDENT>stem[u] = v <EOL>if a(v, dfs_data) == u: <EOL><INDENT>large_n[v] = <NUM_LIT:0><EOL>if wt(u, v, dfs_data) % <NUM_LIT:2> == <NUM_LIT:0>:<EOL><INDENT>v_I = v<EOL><DEDENT>else:<EOL><INDENT>b_u = b[u]<EOL>l2_v = L2(v, dfs_data)<EOL>if l2_v < b_u:<EOL><INDENT>large_n[v] = <NUM_LIT:1><EOL><DEDENT>elif b_u != <NUM_LIT:1>:<EOL><INDENT>xnode = stem[l2_v]<EOL>if large_n[xnode] != <NUM_LIT:0>:<EOL><INDENT>large_n[v] = large_n[xnode] + <NUM_LIT:1><EOL><DEDENT>elif dfs_data['<STR_LIT>'].adjacent(u, L1(v, dfs_data)):<EOL><INDENT>large_n[v] = <NUM_LIT:2><EOL><DEDENT>else:<EOL><INDENT>large_n[v] = large_n[u]<EOL><DEDENT><DEDENT>if large_n[v] % <NUM_LIT:2> == <NUM_LIT:0>:<EOL><INDENT>v_II = v<EOL>break <EOL><DEDENT><DEDENT><DEDENT><DEDENT>if v_II != <NUM_LIT:0>:<EOL><INDENT>dfs_data['<STR_LIT>'][u].remove(v_II)<EOL>dfs_data['<STR_LIT>'][u].insert(<NUM_LIT:0>, v_II)<EOL><DEDENT>elif v_I != <NUM_LIT:0>:<EOL><INDENT>dfs_data['<STR_LIT>'][u].remove(v_I)<EOL>dfs_data['<STR_LIT>'][u].insert(<NUM_LIT:0>, v_I)<EOL><DEDENT>first_time = True<EOL>for v in dfs_data['<STR_LIT>'][u]:<EOL><INDENT>if a(v, dfs_data) == u:<EOL><INDENT>b[v] = u<EOL>if first_time:<EOL><INDENT>b[v] = b[u]<EOL><DEDENT>elif wt(u, v, dfs_data) % <NUM_LIT:2> == <NUM_LIT:0>:<EOL><INDENT>large_n[v] = <NUM_LIT:0><EOL><DEDENT>else:<EOL><INDENT>large_n[v] = <NUM_LIT:1><EOL><DEDENT>stem[u] = v<EOL>__branch_point_dfs_recursive(v, large_n, b, stem, dfs_data)<EOL><DEDENT>first_time = False<EOL><DEDENT>return<EOL>
A recursive implementation of the BranchPtDFS function, as defined on page 14 of the paper.