code: def token_to_id(self, token):
          
          token = self.process_token(token)
          return self._token2id.get(token, len(self._token2id) - 1)
docs: Get the token_id of given token.
  
          Args:
              token (str): token from vocabulary.
  
          Returns:
              int: int id of token.