def insert_line_in_string(input_string, new_str, insert_line):
    """
    Inserts a new line into a string at the specified line number.

    :param input_string: The original string.
    :param new_str: The string to insert.
    :param insert_line: The line number at which to insert (1-based index).
    :return: The modified string.
    """
    file_text = input_string.expandtabs()
    new_str = new_str.expandtabs()

    file_text_lines = file_text.split('\n')

    new_str_lines = new_str.split('\n')
    new_file_text_lines = (
        file_text_lines[:insert_line] + new_str_lines + file_text_lines[insert_line:]
    )

    return '\n'.join(new_file_text_lines)

    Inserts a new line into a string at the specified line number.

    :param input_string: The original string.
    :param new_str: The string to insert.
    :param insert_line: The line number at which to insert (1-based index).
    :return: The modified string.
    
evaluation/benchmarks/testgeneval/scripts/eval/build_outputs_ablation.py