def generate_layout(bpmn_graph):
classification = generate_elements_clasification(bpmn_graph)<EOL>(sorted_nodes_with_classification, backward_flows) = topological_sort(bpmn_graph, classification[<NUM_LIT:0>])<EOL>grid = grid_layout(bpmn_graph, sorted_nodes_with_classification)<EOL>set_coordinates_for_nodes(bpmn_graph, grid)<EOL>set_flows_waypoints(bpmn_graph)<EOL>
:param bpmn_graph: an instance of BPMNDiagramGraph class.