def _extreme_node(self, side):
        """
        Return the leaf node found by descending the given side of the
        BST (either _LEFT or _RIGHT).
        """
        if not self._root:
            raise IndexError('Empty Binary Search Tree!')
        node = self._root
        # Walk down the specified side of the tree.
        while node[side]:
            node = node[side]
        return node

        Return the leaf node found by descending the given side of the
        BST (either _LEFT or _RIGHT).
        
recipes/Python/577830_Python_Binary_Search_Tree/recipe-577830.py