code: def write_prediction(path, position1_result, position2_result):
      import codecs
  
      with codecs.open(path, "w", encoding="utf8") as file:
          batch_num = len(position1_result)
          for i in range(batch_num):
              position1_batch = position1_result[i]
              position2_batch = position2_result[i]
  
              for j in range(position1_batch.shape[0]):
                  file.write(
                      str(position1_batch[j])
                      + "\t"
                      + str(position2_batch[j])
                      + "\n"
                  )
  
imports: import argparse
  import heapq
  import json
  import os
  import pickle
  import logging
  import numpy
  from tensorflow.train import init_from_checkpoint
  import graph
  from util import Timer
  import nni
  import data
  import evaluate
  from train_model import *
label_desc: Use image node_id 5 for calling a global function with example usage: write_prediction(path, position1_result, position2_result) without return types