Python Supervised Binary Search