def __eq__(self, other):
        return (isinstance(other, self.__class__) and
                other.package == self.package)
def remove(root, key):
    left, right = split(root, key)
    return merge(left, split(right, key + 1)[1])