human
I wrote the below code

    @wraps(func)
    def wrapper(self, *args, **kwargs):
        if ((self.token is None) or self.token_expired):
            self.login()
        elif self.token_needs_refresh:
            self.refresh_token()
        return func(self, *args, **kwargs)
    return wrapper

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

def requires_auth(func):