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