<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def revoke_tokens(self):
 """ Revokes the refresh token and all access tokens that were generated using it. """


        self.is_active = False
        self.save()

        for access_token in self.access_tokens.all():
            access_token.revoke()