def METHOD_NAME(user: User) -> bool:
    if not user.is_authenticated:
        return False
    if not hasattr(user, "_has_mfa"):
        user._has_mfa = MFAKey.objects.filter(user=user).exists()
    return user._has_mfa