code: def read_sentences(infile):
      """
      Read sentences from an open file
      """
      sents = []
      cache = []
      for line in infile:
          if isinstance(line, bytes):
              line = line.decode()
          line = line.rstrip()
          if len(line) == 0:
              if len(cache) > 0:
                  sents.append(cache)
                  cache = []
              continue
          array = line.split()
          assert len(array) == 2
          w, t = array
          cache.append([w, t])
      if len(cache) > 0:
          sents.append(cache)
          cache = []
      return sents
  
imports: from collections import Counter
  import random
  import zipfile
  from stanza.utils.datasets.ner.utils import write_dataset
label_desc: Use image node_id 1 for calling a global function with example usage: read_sentences(infile) and returns: sents