def add_node(self, node, attrs=None):
if attrs is None:<EOL><INDENT>attrs = []<EOL><DEDENT>if (not node in self.node_neighbors):<EOL><INDENT>self.node_neighbors[node] = []<EOL>self.node_attr[node] = attrs<EOL><DEDENT>else:<EOL><INDENT>raise AdditionError("<STR_LIT>" % node)<EOL><DEDENT>
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.