code: def add_node(self, node, attrs = None):
          
          if attrs is None:
              attrs = []
          if (node not in self.node_neighbors):
              self.node_neighbors[node] = []
              self.node_incidence[node] = []
              self.node_attr[node] = attrs
          else:
              raise AdditionError("Node %s already in digraph" % node)
docs: Add given node to the graph.
          
          @attention: While nodes can be of any type, it's strongly recommended to use only
          numbers and single-line strings as node identifiers if you intend to use write().
  
          @type  node: node
          @param node: Node identifier.
          
          @type  attrs: list
          @param attrs: List of node attributes specified as (attribute, value) tuples.