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 vocab
  
file_path: nni/examples/trials/ga_squad/data.py
imports: import csv
  import json
  from random import shuffle
  import numpy
label_desc: Use image node_id 3 for calling a global function with example usage: collect_vocab(qp_pairs) and returns: vocab