code: def save_vocabulary(self, vocabulary):
      vocab_file = os.path.join(self.out_dir, self.vocab_file_name)
      with open(vocab_file, "w") as f:
          f.writelines([w + "\n" for w in vocabulary])
  
file_path: mmf/tools/scripts/gqa/extract_vocabulary.py
imports: import argparse
  import json
  import os
  from collections import Counter
  from mmf.utils.text import tokenize
label_desc: Use image node_id 3 for calling the ExtractVocabulary obj's underlying member method code with example usage: obj.save_vocabulary(vocabulary) without return types