<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(self, role):
 """Remove a role from the entity. :type role: str :param role: The role to remove from the entity. """

        if role in self.roles:
            self.roles.remove(role)