code: def read(fname):
      sent = []
      for line in open(fname):
          line = line.strip().split()
          if not line:
              if sent:
                  yield sent
              sent = []
          else:
              w, p = line
              sent.append((w, p))
  
imports: import dynet
  from collections import Counter
  import random
  import util
label_desc: Use image node_id 1 for calling a global function with example usage: read(fname) without return types