    def delete_token(self, token_id: int, password: str) -> None:
        """
        Delete the token with the given name. Useful for cleanup after changes.

        Args:
            token_id (`int`):
                The token id.
            password (`str`):
                The password of current author.

        Raises:
            (`HTTPError`)
                Raise error in request.
        """
        url = f'{self._root}/api/v1/users/{self._author}/tokens/{token_id}'
        try:
            response = requests.delete(url, auth=HTTPBasicAuth(self._author, password))
            response.raise_for_status()
        except HTTPError as e:
            raise e
Delete the token with the given name. Useful for cleanup after changes.

Args:
token_id (`int`):
The token id.
password (`str`):
The password of current author.

Raises:
(`HTTPError`)
Raise error in request.
towhee/utils/hub_utils.py