def __init__(self, package, version):
        """Construct a new requirement.

        :param package: the package name.
        :param version: a semver compatible version specification.
        """
        self.package = package
        self.version = version
        if self.version and not re.match(r"[<=>~]", version[:2]):
            self.version = "=={}".format(self.version)
def split(root, minRight):
    if root is None:
        return None, None
    if root.key >= minRight:
        left, right = split(root.left, minRight)
        root.left = right
        root.update()
        return left, root
    else:
        left, right = split(root.right, minRight)
        root.right = left
        root.update()
        return root, right