code: def __init__(
      self,
      lower_case=True,
      pretrained_word_emb_name=None,
      pretrained_word_emb_url=None,
      pretrained_word_emb_cache_dir=None,
      embedding_dims=300,
  ):
      self.symbol2idx = {}
      self.idx2symbol = {}
      self.vocab_size = 0
  
      self.pad_token = "<PAD>"
      self.start_token = "<START>"
      self.end_token = "<END>"
      self.unk_token = "<UNK>"
      self.non_terminal_token = "<NON-TERMINAL>"
  
      self.add_symbol(self.pad_token)
      self.add_symbol(self.start_token)
      self.add_symbol(self.end_token)
      self.add_symbol(self.unk_token)
      self.add_symbol(self.non_terminal_token)
  
      self.lower_case = lower_case
      self.embedding_dims = embedding_dims
      self.embeddings = None
  
      self.pretrained_word_emb_name = pretrained_word_emb_name
      self.pretrained_word_emb_url = pretrained_word_emb_url
      self.pretrained_word_emb_cache_dir = pretrained_word_emb_cache_dir
  
imports: from operator import itemgetter
  import numpy
label_desc: Use image node_id 1 to create a new Vocab object  with example: obj = Vocab(lower_case, pretrained_word_emb_name, pretrained_word_emb_url, pretrained_word_emb_cache_dir, embedding_dims)