<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def write_file(writer, filename):
 """Write all of lines from file using the writer."""

  for line in txt_line_iterator(filename):
    writer.write(line)
    writer.write("\n")