code: def add_node(self, node_name):
          
          graph = self.graph
          if node_name in graph:
              raise KeyError('node %s already exists' % node_name)
          graph[node_name] = set()
docs: Add a node if it does not exist yet, or error out.
  
          Args:
              node_name (str): The unique name of the node to add.
  
          Raises:
              KeyError: Raised if a node with the same name already exist in the
                        graph