<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def check(self, request, response, secret):
 """Checks the response for the appropriate signature. Returns True if the signature matches the expected value. Keyword arguments: request -- A request object which can be consumed by this API. response -- A requests response object or compatible signed response object. secret -- The base64-encoded secret key for the HMAC authorization. """

        auth = request.get_header('Authorization')
        if auth == '':
            raise KeyError('Authorization header is required for the request.')
        ah = self.orig.parse_auth_headers(auth)
        act = response.headers['X-Server-Authorization-HMAC-SHA256']
        if act == '':
            raise KeyError('Response is missing the signature header X-Server-Authorization-HMAC-SHA256.')
        sig = self.sign(request, ah, response.text, secret)
        return sig == act