def METHOD_NAME(self, request, view):
    template_ids = request.data.get("template_ids") or []
    action = self.iam_mapping_config[self.template_type]["delete_action"]
    resources_list = self.iam_mapping_config[self.template_type]["resources_list_func"](template_ids)
    allow_or_raise_immediate_response_for_resources_list(
        iam=iam,
        system=IAMMeta.SYSTEM_ID,
        subject=Subject("user", request.user.username),
        action=action,
        resources_list=resources_list,
    )