def METHOD_NAME(self, user):
    """Invoked to enroll a user for this interface.  If already enrolled
    an error is raised.
    If `disallow_new_enrollment` is `True`, raises exception: `NewEnrollmentDisallowed`.
    """
    from sentry.models import Authenticator
    if self.disallow_new_enrollment:
        raise NewEnrollmentDisallowed
    if self.authenticator is None:
        self.authenticator = Authenticator.objects.create(
            user_id=user.id, type=self.type, config=self.config
        )
    else:
        if not self.allow_multi_enrollment:
            raise Authenticator.AlreadyEnrolled()
        self.authenticator.config = self.config
        self.authenticator.save()