code: def write_sentences_to_file(sents, filename):
      print(f"Writing {len(sents)} sentences to {filename}")
      with open(filename, "w") as outfile:
          for sent in sents:
              for pair in sent:
                  print(f"{pair[0]}\t{pair[1]}", file=outfile)
              print("", file=outfile)
  
imports: import os
  import random
  from collections import Counter
label_desc: Use image node_id 2 for calling a global function with example usage: write_sentences_to_file(sents, filename) without return types