def METHOD_NAME(list_of_keys, search_key):
    """
    Perform a Binary search.
    Returns the number of comparisons required.
    Based on code from:
    http://rosettacode.org/wiki/Binary_search#Python:_Iterative
    """
    length = len(list_of_keys)
    if length == 0:
        print("List of keys not found.")
        return 0
    if length == 1:
        return 1
    key_comparisons_made = 0
    low = 0
    high = len(list_of_keys) - 1
    while low <= high:
        middle = (low + high) // 2
        key_comparisons_made += 1
        if list_of_keys[middle] > search_key:
            high = middle - 1
        elif list_of_keys[middle] < search_key:
            low = middle + 1
            key_comparisons_made += 1
        else:
            # increment here because the previous comparison was unsuccessful
            key_comparisons_made += 1
            return key_comparisons_made
    return 0