def find_longest_path(previous_nodes, node, bpmn_graph):
outgoing_flows_list_param_name = "<STR_LIT>"<EOL>outgoing_flows_list = node[<NUM_LIT:1>][outgoing_flows_list_param_name]<EOL>longest_path = []<EOL>if len(outgoing_flows_list) == <NUM_LIT:0>:<EOL><INDENT>tmp_previous_nodes = copy.deepcopy(previous_nodes)<EOL>tmp_previous_nodes.append(node)<EOL>return tmp_previous_nodes, len(tmp_previous_nodes)<EOL><DEDENT>else:<EOL><INDENT>tmp_previous_nodes = copy.deepcopy(previous_nodes)<EOL>tmp_previous_nodes.append(node)<EOL>for outgoing_flow_id in outgoing_flows_list:<EOL><INDENT>flow = bpmn_graph.get_flow_by_id(outgoing_flow_id)<EOL>outgoing_node = bpmn_graph.get_node_by_id(flow[<NUM_LIT:2>][consts.Consts.target_ref])<EOL>if outgoing_node not in previous_nodes:<EOL><INDENT>(output_path, output_path_len) = find_longest_path(tmp_previous_nodes, outgoing_node, bpmn_graph)<EOL>if output_path_len > len(longest_path):<EOL><INDENT>longest_path = output_path<EOL><DEDENT><DEDENT><DEDENT>return longest_path, len(longest_path)<EOL><DEDENT>
:param previous_nodes:
:param node:
:param bpmn_graph:
:return: