class_docstr: Simple vocabulary wrapper.
class_docstr_tok: ["Simple","vocabulary","wrapper","."]
code: def add_word(self, word):
      if not word in self.word2idx:
          self.word2idx[word] = self.idx
          self.idx2word[self.idx] = word
          self.idx += 1
  
file_path: pytorch-tutorial/tutorials/03-advanced/image_captioning/build_vocab.py
imports: import nltk
  import pickle
  import argparse
  from collections import Counter
  from pycocotools.coco import COCO
label_desc: Use image node_id 2 for calling the Vocabulary obj's underlying member method code with example usage: obj.add_word(word) without return types