Add sum_all_lines helper function.