def clear_roles(self, user, assignee):
        """
        Clears all the roles from assignee. The 'user' argument is used for
        logging purposes.
        """
        try:
            p_as_user = Participant.objects.get(workflowactivity=self, 
                        user=user, disabled=False)
            p_as_assignee = Participant.objects.get(workflowactivity=self, 
                    user=assignee)
            p_as_assignee.roles.clear()
            name = assignee.get_full_name() if assignee.get_full_name() else assignee.username
            note = _('All roles removed from %s')%name
            current_state = self.current_state().state if self.current_state() else None
            deadline = self.current_state().deadline if self.current_state() else None
            wh = WorkflowHistory(
                        workflowactivity=self,
                        state=current_state,
                        log_type=WorkflowHistory.ROLE,
                        participant=p_as_user,
                        note=note,
                        deadline=deadline
                        )
            wh.save()
            role_removed.send(sender=wh)
            return wh
        except __HOLE__:
            # If we can't find the assignee then there is nothing to do
            pass
dataset/ETHPy150Open ntoll/workflow/workflow/models.py/WorkflowActivity.clear_roles