code: def write_predictions_to_file(
      self, writer: TextIO, test_input_reader: TextIO, preds_list: List
  ):
      example_id = 0
      for sentence in parse_incr(test_input_reader):
          s_p = preds_list[example_id]
          out = ""
          for token in sentence:
              out += f'{token["form"]} ({token["upos"]}|{s_p.pop(0)}) '
          out += "\n"
          writer.write(out)
          example_id += 1
  
file_path: H2O/h2o_flexgen/benchmark/third_party/transformers/examples/legacy/token-classification/tasks.py
imports: import logging
  import os
  from typing import List, TextIO, Union
  from conllu import parse_incr
  from utils_ner import InputExample, Split, TokenClassificationTask
label_desc: Use image node_id 2 for calling the POS obj's underlying member method code with example usage: obj.write_predictions_to_file(writer, test_input_reader, preds_list) without return types