def delete_node(self, node_id):
node = self.get_node(node_id)<EOL>for e in node['<STR_LIT>']:<EOL><INDENT>self.delete_edge_by_id(e)<EOL><DEDENT>edges = [edge_id for edge_id, edge in list(self.edges.items()) if edge['<STR_LIT>'][<NUM_LIT:1>] == node_id]<EOL>for e in edges:<EOL><INDENT>self.delete_edge_by_id(e)<EOL><DEDENT>del self.nodes[node_id]<EOL>self._num_nodes -= <NUM_LIT:1><EOL>
Removes the node identified by node_id from the graph.