code: def __init__(self, w2i):
      self.w2i = dict(w2i)
      self.i2w = {i: w for w, i in w2i.items()}
  
file_path: dynet/examples/python-utils/util.py
imports: import mmap
label_desc: Use image node_id 1 to create a new Vocab object  with example: obj = Vocab(w2i)