code: def add_token(self, token: str):
      if token in self._token2id:
          index = self._token2id[token]
      else:
          index = len(self._token2id)
          self._token2id[token] = index
          self._id2token[index] = token
      return index
  
imports: from typing import Dict
label_desc: Use image node_id 4 for calling the Vocabulary obj's underlying member method code with example usage: obj.add_token(token) and returns: index