code: def write_predictions(path, texts, labels):
      """[write model predictions to path (conll format)]
  
      Args:
          path ([str]): [save path]
          texts ([List]): [raw texts]
          labels ([List]): [predict labels]
      """
      print(len(texts), len(labels))
      assert len(texts) == len(labels)
      if not os.path.exists(path):
          os.system(r"touch {}".format(path))
  
      with open(path, "w", encoding="utf-8") as f:
          f.writelines("-DOCSTART-	O\n\n")
          for i in range(len(texts)):
              for j in range(len(texts[i])):
                  f.writelines(
                      "{}\t{}\n".format(texts[i][j], labels[i][j])
                  )
              f.writelines("\n")
  
file_path: DeepKE/src/deepke/name_entity_re/few_shot/utils/util.py
imports: import torch
  import numpy
  import random
  from torch import nn
  import torch.nn.functional
  from transformers import BartModel, BartTokenizer, BertTokenizer
  import os
label_desc: Use image node_id 7 for calling a global function with example usage: write_predictions(path, texts, labels) without return types