def binary_search(data, target, lo=0, hi=None):
    """
    Perform binary search on sorted list data for target. Returns int
    representing position of target in data.
    """
    hi = hi if hi is not None else len(data)
    mid = (lo + hi) // 2
    if hi < 2 or hi > len(data) or target > data[-1] or target < data[0]:
        return -1
    if data[mid] > target:
        return binary_search(data, target, lo=lo, hi=mid)
    elif data[mid] < target:
        return binary_search(data, target, lo=(mid + 1), hi=hi)
    elif data[mid] == target:
        return mid
Perform binary search on sorted list data for target. Returns int
    representing position of target in data.