def delete(self, values):
        if len(values) != self.parentCount:
            raise ValueError('You must supply %d values' % self.parentCount)
        tree = self.tree
        old_tree = None
        while True:
            if tree.isLeaf():
                if old_tree is not None:
                    val = values[old_tree.parentId]
                    del old_tree[val]
                    old_tree.vanish()
                    break
                else:
                    raise ValueError("Cannot delete value in default branch of tree")
            else:
                val = values[tree.parentId]
                if tree in val:
                    tree, old_tree = tree[val], tree
                else:
                    tree = tree[val]
                    old_tree = None
dataset/ETHPy150Open uci-cbcl/tree-hmm/gmtkParam/__init__.py/DT.delete/swapped operands of `in`