Fastapi Return Binary Search In Python Algorithm