code: async def is_anonymous(request):
      
      identity_policy = request.config_dict.get(IDENTITY_KEY)
      if identity_policy is None:
          return True
      identity = await identity_policy.identify(request)
      if identity is None:
          return True
      return False
docs: Check if user is anonymous.
  
      User is considered anonymous if there is not identity
      in request.