<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def token_to_id(self, token):
 """Get the token_id of given token. Args: token (str):
 token from vocabulary. Returns: int: int id of token. """

        token = self.process_token(token)
        return self._token2id.get(token, len(self._token2id) - 1)