def METHOD_NAME(self, request: Request, user, category, identity_id) -> Response:
    with transaction.atomic(using=router.db_for_write(Identity)):
        identity = self._get_identity(user, category, identity_id)
        if not identity:
            # Returns 404 even if the ID exists but belongs to
            # another user. In that case, 403 would also be
            # appropriate, but 404 is fine or even preferable.
            return Response(status=status.HTTP_404_NOT_FOUND)
        if identity.status != Status.CAN_DISCONNECT:
            return Response(status=status.HTTP_403_FORBIDDEN)
        model_type = identity.get_model_type_for_category()
        model_type.objects.get(id=int(identity_id)).METHOD_NAME()
    return Response(status=status.HTTP_204_NO_CONTENT)