more human thing would be to pick middle element in such way as to not only split the array in half but to get as close as possible to the search term the middle position was calculated for using the following rulemid_point (index_of_first_element index_of_last_element)/ we shall replace this formula with better one that brings us close to the search term mid_point will receive the return value of the nearest_mid function def nearest_mid(input_listlower_bound_indexupper_bound_indexsearch_value)return lower_bound_index (upper_bound_index -lower_bound_index)(input_list[upper_bound_index-input_list[lower_bound_index])(search_value -input_list[lower_bound_index]the nearest_mid function takes as argumentsthe list on which to perform the search the lower_bound_index and upper_bound_index parameters represent the bounds in the list within which we are hoping to find the search term search_value represents the value being searched for these are used in the formulalower_bound_index (upper_bound_index lower_bound_index)(input_list[upper_bound_indexinput_list[lower_bound_index])(search_value input_list[lower_bound_index]given our search list and the nearest_mid will be computed with the following valueslower_bound_index upper_bound_index input_list[upper_bound_index input_list[lower_bound_index search_value it can now be seen thatthe mid_point will receive the value which is the index of the location of our search term binary search would have chosen as the mid which will require another run of the algorithm