def rename_node(self, prefix):
node_map_dict = {}<EOL>for i in range(<NUM_LIT:0>, len(self.nodes)):<EOL><INDENT>node_map_dict[self.nodes[i]] = prefix + str(i)<EOL><DEDENT>for i, v in enumerate(self.nodes):<EOL><INDENT>self.nodes[i] = node_map_dict[v]<EOL><DEDENT>for node_relations in self.relations:<EOL><INDENT>for i, l in enumerate(node_relations):<EOL><INDENT>node_relations[i][<NUM_LIT:1>] = node_map_dict[l[<NUM_LIT:1>]]<EOL><DEDENT><DEDENT>
Rename AMR graph nodes to prefix + node_index to avoid nodes with the same name in two different AMRs.