<commit_before>def binary_search(array, num_to_find):
    return binary_search_with_bounds(array, num_to_find, 0, len(array) - 1)

def binary_search_with_bounds(array, num_to_find, left, right):
    if (left <= right):
        middle = left + (right - left) // 2
        middle_value = array[middle]

        if (num_to_find == middle_value):
            return middle
        elif (num_to_find < middle_value):
            return binary_search_with_bounds(array, num_to_find, left, middle - 1)
        elif (num_to_find > middle_value):
            return binary_search_with_bounds(array, num_to_find, middle + 1, right)
    else:
        raise ValueError("Value not found")<commit_msg>Fail fast on base case<commit_after>def binary_search(array, num_to_find):
    return binary_search_with_bounds(array, num_to_find, 0, len(array) - 1)

def binary_search_with_bounds(array, num_to_find, left, right):
    if (left > right):
        raise ValueError("Value not found")

    middle = left + (right - left) // 2
    middle_value = array[middle]

    if (num_to_find == middle_value):
        return middle
    elif (num_to_find < middle_value):
        return binary_search_with_bounds(array, num_to_find, left, middle - 1)
    elif (num_to_find > middle_value):
        return binary_search_with_bounds(array, num_to_find, middle + 1, right)
{'fraction_non_alphanumeric': 0.09694258016405667, 'fraction_numerical': 0.007457121551081283, 'mean_word_length': 3.4584717607973423, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2349361', 'n_tokens_mistral': 438, 'n_tokens_neox': 426, 'n_words': 106}