Python Supervised Binary Search In Java