code: def collect_vocab(qp_pairs):
      '''
      Build the vocab from corpus.
      '''
      vocab = set()
      for qp_pair in qp_pairs:
          for word in qp_pair['question_tokens']:
              vocab.add(word['word'])
          for word in qp_pair['passage_tokens']:
              vocab.add(word['word'])
      return vocaf collect_vocab(qp_pairs):
      '''
      Build the vocab from corpus.
      '''
      vocab = set()
      for qp_pair in qp_pairs:
          for word in qp_pair['question_tokens']:
              vocab.add(word['word'])
          for word in qp_pair['passage_tokens']:
              vocab.add(word['word'])
      return vocab
docs: Build the vocab from corpus.