def inorder_successor_2(root, node):
    """PREFERRED: in-order successor of a node is one that appears next during in-order traversal"""
    successor = None
    while root:
        #
        # if node value greater or equal to current node, it means, successor
        # is somewhere on the right subtree. Note the >= instead of >
        #
        if node.val >= root.val:
            root = root.right
        #
        # if node value is less than current node, then, current node being greater
        # than this node value is a potential successor. Keep searching on the left
        # subtree
        #
        else:
            successor = root
            root = root.left
    return successor