def add_node(self, id, radius=<NUM_LIT:8>, style=style.DEFAULT, category="<STR_LIT>", label=None, root=False,<EOL>properties={}):
if id in self: <EOL><INDENT>return self[id]<EOL><DEDENT>if not isinstance(style, str) and style.__dict__.has_key["<STR_LIT:name>"]:<EOL><INDENT>style = style.name<EOL><DEDENT>n = node(self, id, radius, style, category, label, properties)<EOL>self[n.id] = n<EOL>self.nodes.append(n)<EOL>if root: self.root = n<EOL>return n<EOL>
Add node from id and return the node object.