code: def filter_lines(input_file, output_file, translate=lambda line: line):
      
      filepath, lines = get_lines([input_file])[0]
      return filepath, [(tag, translate(line=line, tag=tag)) for (tag, line) in lines]
docs: Translate all the lines of a single file