code: def _identity_loader(self) -> Union[Identity, None]:
          
          if not isinstance(current_user._get_current_object(), AnonymousUser):
              return Identity(current_user.id)
docs: Identity loading function to be passed to be assigned to the Principal
          instance returned by :meth:`_get_principal`.