<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def clean(self):
 """ Validates the current instance. """

        super().clean()
        if (
            (self.user is None and not self.anonymous_user) or
            (self.user and self.anonymous_user)
        ):
            raise ValidationError(
                _('A permission should target either a user or an anonymous user'),
            )