code: def delete_node(self, node_name):
          
          graph = self.graph
          if node_name not in graph:
              raise KeyError('node %s does not exist' % node_name)
          graph.pop(node_name)
  
          for node, edges in graph.items():
              if node_name in edges:
                  edges.remove(node_name)
docs: Deletes this node and all edges referencing it.
  
          Args:
              node_name (str): The name of the node to delete.
  
          Raises:
              KeyError: Raised if the node does not exist in the graph.