def graph_copy_integrity_checker(self, original_graph, addition_graph):
main_graph = copy.deepcopy(original_graph)<EOL>node_map, edge_map = merge_graphs(main_graph, addition_graph)<EOL>expected_node_count = len(original_graph.get_all_node_ids()) + len(addition_graph.get_all_node_ids())<EOL>expected_edge_count = len(original_graph.get_all_edge_ids()) + len(addition_graph.get_all_edge_ids())<EOL>self.assertEqual(expected_node_count, len(main_graph.get_all_node_ids()))<EOL>self.assertEqual(expected_edge_count, len(main_graph.get_all_edge_ids()))<EOL>for node_id in original_graph.get_all_node_ids():<EOL><INDENT>original_node = original_graph.get_node(node_id)<EOL>new_node = main_graph.get_node(node_id)<EOL>self.assertEqual(len(original_node['<STR_LIT>']), len(new_node['<STR_LIT>']))<EOL>for edge_id in original_node['<STR_LIT>']:<EOL><INDENT>self.assertIn(edge_id, new_node['<STR_LIT>'])<EOL><DEDENT><DEDENT>for edge_id in original_graph.get_all_edge_ids():<EOL><INDENT>original_edge = original_graph.get_edge(edge_id)<EOL>new_edge = main_graph.get_edge(edge_id)<EOL>self.assertEqual(original_edge['<STR_LIT>'], new_edge['<STR_LIT>'])<EOL><DEDENT>for node_id in addition_graph.get_all_node_ids():<EOL><INDENT>original_node = addition_graph.get_node(node_id)<EOL>new_node = main_graph.get_node(node_map[node_id])<EOL>self.assertEqual(len(original_node['<STR_LIT>']), len(new_node['<STR_LIT>']))<EOL>for edge_id in original_node['<STR_LIT>']:<EOL><INDENT>self.assertIn(edge_map[edge_id], new_node['<STR_LIT>'])<EOL><DEDENT><DEDENT>for edge_id in addition_graph.get_all_edge_ids():<EOL><INDENT>original_edge = addition_graph.get_edge(edge_id)<EOL>new_edge = main_graph.get_edge(edge_map[edge_id])<EOL>original_vertex_a, original_vertex_b = original_edge['<STR_LIT>']<EOL>mapped_new_vertices = (node_map[original_vertex_a], node_map[original_vertex_b])<EOL>self.assertEqual(mapped_new_vertices, new_edge['<STR_LIT>'])<EOL><DEDENT>
Utility function to test the integrity of a graph copy.