def challenge(self, challenge):
<EOL>if not challenge:<EOL><INDENT>logger.debug("<STR_LIT>")<EOL>return Failure("<STR_LIT>")<EOL><DEDENT>if self._server_first_message:<EOL><INDENT>return self._final_challenge(challenge)<EOL><DEDENT>match = SERVER_FIRST_MESSAGE_RE.match(challenge)<EOL>if not match:<EOL><INDENT>logger.debug("<STR_LIT>".format(challenge))<EOL>return Failure("<STR_LIT>")<EOL><DEDENT>self._server_first_message = challenge<EOL>mext = match.group("<STR_LIT>")<EOL>if mext:<EOL><INDENT>logger.debug("<STR_LIT>".format(mext))<EOL>return Failure("<STR_LIT>")<EOL><DEDENT>nonce = match.group("<STR_LIT>")<EOL>if not nonce.startswith(self._c_nonce):<EOL><INDENT>logger.debug("<STR_LIT>")<EOL>return Failure("<STR_LIT>")<EOL><DEDENT>salt = match.group("<STR_LIT>")<EOL>try:<EOL><INDENT>salt = a2b_base64(salt)<EOL><DEDENT>except ValueError:<EOL><INDENT>logger.debug("<STR_LIT>".format(salt))<EOL>return Failure("<STR_LIT>")<EOL><DEDENT>iteration_count = match.group("<STR_LIT>")<EOL>try:<EOL><INDENT>iteration_count = int(iteration_count)<EOL><DEDENT>except ValueError:<EOL><INDENT>logger.debug("<STR_LIT>".format(iteration_count))<EOL>return Failure("<STR_LIT>")<EOL><DEDENT>return self._make_response(nonce, salt, iteration_count)<EOL>
Process a challenge and return the response.

        :Parameters:
            - `challenge`: the challenge from server.
        :Types:
            - `challenge`: `bytes`

        :return: the response or a failure indicator.
        :returntype: `sasl.Response` or `sasl.Failure`