def validate_username(self, username):
        try:
            User = get_user_model()
            self.user = User.objects.get(**{User.USERNAME_FIELD: username})
        except __HOLE__:
            msg = _('That {} does not exist.'.format(User.USERNAME_FIELD))
            raise serializers.ValidationError(msg)
dataset/ETHPy150Open silverlogic/djangorestframework-timed-auth-token/timed_auth_token/serializers.py/TimedAuthTokenCreateSerializer.validate_username