code: def parse_line(vocab, line):
      """Parses each line and make a named tuple.
  
      Args:
          vocab (collections.defaultdict): A dictionary storing word IDs.
          line (str): A line to parse in bAbI dataset.
  
      Returns:
          Query or Sentence: Parsed tuple.
  
      """
      if "\t" in line:
          # question line
          question, answer, fact_id = line.split("\t")
          aid = convert(vocab, [answer])[0]
          words = split(question)
          wid = convert(vocab, words)
          ids = list(map(int, fact_id.split(" ")))
          return Query(wid, aid, ids)
  
      else:
          # sentence line
          words = split(line)
          wid = convert(vocab, words)
          return Sentence(wid)
  
imports: import collections
label_desc: Use image node_id 3 for calling a global function with example usage: parse_line(vocab, line) and returns: Query, Sentence