def _internal_get_cut_vertex_list(graph):
list_of_cut_vertices = set()<EOL>if graph.num_nodes() == <NUM_LIT:0>:<EOL><INDENT>return list(list_of_cut_vertices)<EOL><DEDENT>dfs_count = <NUM_LIT:0><EOL>root_dfs_count = <NUM_LIT:1><EOL>dfs_stack = deque()<EOL>visited = defaultdict(lambda: False)<EOL>parent = defaultdict(lambda: None)<EOL>children = defaultdict(lambda: [])<EOL>depth = {}<EOL>low = {}<EOL>preorder_processed = defaultdict(lambda: False)<EOL>postorder_processed = defaultdict(lambda: False)<EOL>unvisited_nodes = set(graph.get_all_node_ids())<EOL>while len(unvisited_nodes) > <NUM_LIT:0>:<EOL><INDENT>u = unvisited_nodes.pop()<EOL>parent[u] = u<EOL>stack_frame = {<EOL>'<STR_LIT:u>': u,<EOL>'<STR_LIT:v>': None,<EOL>'<STR_LIT>': graph.neighbors(u)<EOL>}<EOL>dfs_stack.appendleft(stack_frame)<EOL>while len(dfs_stack) > <NUM_LIT:0>:<EOL><INDENT>frame = dfs_stack.popleft()<EOL>u = frame['<STR_LIT:u>']<EOL>v = frame['<STR_LIT:v>']<EOL>if not visited[u]:<EOL><INDENT>if u in unvisited_nodes:<EOL><INDENT>unvisited_nodes.remove(u)<EOL><DEDENT>visited[u] = True<EOL>dfs_count += <NUM_LIT:1><EOL>depth[u] = dfs_count<EOL>low[u] = depth[u]<EOL>if len(frame['<STR_LIT>']) > <NUM_LIT:0>:<EOL><INDENT>v = frame['<STR_LIT>'].pop()<EOL>frame['<STR_LIT:v>'] = v<EOL><DEDENT><DEDENT>if v is None:<EOL><INDENT>continue<EOL><DEDENT>if not preorder_processed[v]:<EOL><INDENT>parent[v] = u<EOL>children[u].append(v)<EOL>preorder_processed[v] = True<EOL>dfs_stack.appendleft(frame)<EOL>new_frame = {<EOL>'<STR_LIT:u>': v,<EOL>'<STR_LIT:v>': None,<EOL>'<STR_LIT>': graph.neighbors(v)<EOL>}<EOL>dfs_stack.appendleft(new_frame)<EOL>continue<EOL><DEDENT>elif not postorder_processed[v] and u == parent[v]:<EOL><INDENT>if low[v] >= depth[u] and depth[u] > <NUM_LIT:1>:<EOL><INDENT>list_of_cut_vertices.add(u)<EOL><DEDENT>low[u] = min(low[u], low[v])<EOL>postorder_processed[v] = True<EOL><DEDENT>elif visited[v] and (parent[u] != v) and (depth[v] < depth[u]):<EOL><INDENT>low[u] = min(low[u], depth[v])<EOL><DEDENT>if len(frame['<STR_LIT>']) > <NUM_LIT:0>:<EOL><INDENT>v = frame['<STR_LIT>'].pop()<EOL>frame['<STR_LIT:v>'] = v<EOL>dfs_stack.appendleft(frame)<EOL><DEDENT><DEDENT><DEDENT>if len(children[root_dfs_count]) > <NUM_LIT:1>:<EOL><INDENT>for node_id, dfs in list(depth.items()):<EOL><INDENT>if dfs == root_dfs_count:<EOL><INDENT>list_of_cut_vertices.add(node_id)<EOL>break<EOL><DEDENT><DEDENT><DEDENT>return list(list_of_cut_vertices)<EOL>
Works on a single connected component to produce the node list of cut vertices.
    Returns a list of nodes.
    Returns an empty list if there are no nodes in the graph (i.e. if it's an empty graph).