'Add a key, data pair.'

def add(self, key, data=None):

    if (data is None):
        data = key
    self.size += 1
    node = self.NodeClass(key, data)
    curr_node = self.root
    if (curr_node is None):
        self.root = node
        return
    while True:
        if (node < curr_node):
            if (curr_node.left is None):
                curr_node.left = node
                break
            curr_node = curr_node.left
        elif (node > curr_node):
            if (curr_node.right is None):
                curr_node.right = node
                break
            curr_node = curr_node.right
        elif self.unique:
            raise ValueError(u'Cannot    insert    non-unique    value')
        else:
            curr_node.data.extend(node.data)
            curr_node.data = sorted(curr_node.data)
            return
