def dict_to_cvode_stats_file(file_dict: dict, log_path: str) -> bool:
    """
    Turns a dictionary into a delphin cvode stats file.

    :param file_dict: Dictionary holding the information for the cvode stats file
    :param log_path: Path to were the cvode stats file should be written
    :return: True
    """

    file_obj = open(log_path + '/integrator_cvode_stats.tsv', 'w')

    file_obj.write('                 Time [s]\t     Steps\t  RhsEvals\t LinSetups\t  NIters\t NConvFails\t  NErrFails\t'
                   ' Order\t  StepSize [s]\n')

    for line_index in range(0, len(file_dict['time'])):
        time_string = ' ' * (25 - len(str("{:.10f}".format(file_dict['time'][line_index])))) + \
                      str("{:.10f}".format(file_dict['time'][line_index]))

        steps_string = ' ' * (10 - len(str(file_dict['steps'][line_index]))) + \
                       str(file_dict['steps'][line_index])

        rhs_string = ' ' * (10 - len(str(file_dict['rhs_evaluations'][line_index]))) + \
                     str(file_dict['rhs_evaluations'][line_index])

        lin_string = ' ' * (10 - len(str(file_dict['lin_setups'][line_index]))) + \
                     str(file_dict['lin_setups'][line_index])

        iterations_string = ' ' * (8 - len(str(file_dict['number_iterations'][line_index]))) + \
                            str(file_dict['number_iterations'][line_index])

        conversion_fails_string = ' ' * (11 - len(str(file_dict['number_conversion_fails'][line_index]))) + \
                                  str(file_dict['number_conversion_fails'][line_index])

        error_fails_string = ' ' * (11 - len(str(file_dict['number_error_fails'][line_index]))) + \
                             str(file_dict['number_error_fails'][line_index])

        order_string = ' ' * (6 - len(str(file_dict['order'][line_index]))) + \
                       str(file_dict['order'][line_index])

        step_size_string = ' ' * (14 - len(str("{:.6f}".format(file_dict['step_size'][line_index])))) + \
                           str("{:.6f}".format(file_dict['step_size'][line_index]))

        file_obj.write(time_string + '\t' + steps_string + '\t' + rhs_string + '\t' + lin_string + '\t'
                       + iterations_string + '\t' + conversion_fails_string + '\t' + error_fails_string + '\t'
                       + order_string + '\t' + step_size_string + '\n')

    file_obj.close()

    return True