    def create_token(self, token_name: str, password: str) -> requests.Response:
        """
        Create an account verification token. This token allows for avoiding HttpBasicAuth for subsequent calls.

        Args:
            token_name (`str`):
                The name to be given to the token.
            password (`str`):
                The password of current author.

        Returns:
            (`Response`)
                Return the token(id, name, sha1, token_last_eight).

        Raises:
            (`HTTPError`)
                Raise the error in request.
        """
        url = f'{self._root}/api/v1/users/{self._author}/tokens'
        data = {'name': token_name}
        try:
            response = requests.post(url, data=data, auth=HTTPBasicAuth(self._author, password))
            response.raise_for_status()
            return response
        except HTTPError as e:
            raise e
Create an account verification token. This token allows for avoiding HttpBasicAuth for subsequent calls.

Args:
token_name (`str`):
The name to be given to the token.
password (`str`):
The password of current author.

Returns:
(`Response`)
Return the token(id, name, sha1, token_last_eight).

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