code: def write_predictions_to_file(
      self, writer: TextIO, test_input_reader: TextIO, preds_list: List
  ):
      example_id = 0
      for line in test_input_reader:
          if (
              line.startswith("-DOCSTART-")
              or line == ""
              or line == "\n"
          ):
              writer.write(line)
              if not preds_list[example_id]:
                  example_id += 1
          elif preds_list[example_id]:
              output_line = (
                  line.split()[0]
                  + " "
                  + preds_list[example_id].pop(0)
                  + "\n"
              )
              writer.write(output_line)
          else:
              logger.warning(
                  "Maximum sequence length exceeded: No prediction for '%s'.",
                  line.split()[0],
              )
  
file_path: underthesea/examples/ner/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 3 for calling the NER obj's underlying member method code with example usage: obj.write_predictions_to_file(writer, test_input_reader, preds_list) without return types