def create_node(self, category, input_node, position=(0,0)):
   if category in self.category_nodes:
     # already have a node for this category, so append to its list
     # of connections
     pos, cxns = self.category_nodes[category]
     cxns.append(input_node)
   
   else:
     cxns = [input_node]
     pos = AndOrRegion.create_node(self, position, self.OR_NODE, cxns)
     self.category_nodes[category] = (pos, cxns)
     self.node_categories[pos] = category
     
   return pos
 def __init__(self, *args, **kwargs):
   AndOrRegion.__init__(self, *args, **kwargs)
   self.category_nodes = {}
   self.node_categories = {}