<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def requires_indieauth(f):
 """Wraps a Flask handler to require a valid IndieAuth access token. """

    @wraps(f)
    def decorated(*args, **kwargs):
        access_token = get_access_token()
        resp = check_auth(access_token)
        if isinstance(resp, Response):
          return resp
        return f(*args, **kwargs)
    return decorated