def add(self, node_spec):
node = BayesNode(*node_spec)<EOL>assert node.variable not in self.vars<EOL>assert every(lambda parent: parent in self.vars, node.parents)<EOL>self.nodes.append(node)<EOL>self.vars.append(node.variable)<EOL>for parent in node.parents:<EOL><INDENT>self.variable_node(parent).children.append(node)<EOL><DEDENT>
Add a node to the net. Its parents must already be in the
        net, and its variable must not.