def get_anonymous_user():
 User = get_user_model()
 lookup = {User.USERNAME_FIELD: guardian_settings.ANONYMOUS_USER_NAME}
 return User.objects.get(**lookup)

def get_anonymous_user ( ) : User = get_user_model ( ) lookup = { User . USERNAME_FIELD : guardian_settings . ANONYMOUS_USER_NAME } return User . objects . get ( ** lookup )
returns user instance depending on anonymous_user_name configuration .