human
I wrote the below code

    def decorate(self, *args, **kwargs):
        if self.client.has_access_token():
            try:
                fun(self, *args, **kwargs)
            except gdata.service.RequestError as error:
                if (error.code in [401, 403]):
                    self.redirect('/oauth/request_token')
                else:
                    raise
        else:
            self.redirect('/oauth/request_token')
    return decorate

What's a good function header?
assistant
#Here's a good function header.

def requiresOAuth(fun):