def METHOD_NAME(settings, user, target):
    if user.id != target.id:
        raise PermissionDenied(
            pgettext_lazy(
                "users delete permission", "You can't delete other users accounts."
            )
        )
    if not settings.METHOD_NAME and not user.is_deleting_account:
        raise PermissionDenied(
            pgettext_lazy("users delete permission", "You can't delete your account.")
        )
    if user.is_staff or user.is_superuser:
        raise PermissionDenied(
            pgettext_lazy(
                "users delete permission",
                "You can't delete your account because you are an administrator.",
            )
        )