code: def load(self, path):
      if self.init_token is not None:
          self.vocab_lst.append(self.init_token)
      if self.eos_token is not None:
          self.vocab_lst.append(self.eos_token)
      if self.pad_token is not None:
          self.vocab_lst.append(self.pad_token)
      if self.unk_token is not None:
          self.vocab_lst.append(self.unk_token)
      with open(path, "r", encoding="utf-8") as f:
          for token in f.readlines():
              token = token.strip()
              self.vocab_lst.append(token)
      self.vocab_dict = {v: k for k, v in enumerate(self.vocab_lst)}
  
file_path: dgl/examples/pytorch/transformer/dataset/fields.py
label_desc: Use image node_id 2 for calling the Vocab obj's underlying member method code with example usage: obj.load(path) without return types