def METHOD_NAME(self, queryset, action_name, form_class):
    context = {
        "action_name": action_name,
        "model_name": self.model._meta.model_name,
        "info": [],
        "queryset": queryset,
        "changelist_url": reverse(
            f"admin:{self.model._meta.app_label}_{self.model._meta.model_name}_changelist"
        ),
        "ACTION_CHECKBOX_NAME": helpers.ACTION_CHECKBOX_NAME,
        "form": form_class(
            initial={
                helpers.ACTION_CHECKBOX_NAME: queryset.values_list("pk", flat=True)
            },
            model_name=self.model._meta.model_name,
            action_name=action_name,
        ),
    }
    if action_name == "_sync_all_instances":
        context["form"] = form_class(
            initial={helpers.ACTION_CHECKBOX_NAME: [action_name]},
            model_name=self.model._meta.model_name,
            action_name=action_name,
        )
    else:
        for obj in queryset:
            admin_url = reverse(
                f"admin:{obj._meta.app_label}_{obj._meta.model_name}_change",
                None,
                (quote(obj.pk),),
            )
            context["info"].append(
                format_html(
                    '{}: <a href="{}">{}</a>',
                    capfirst(obj._meta.verbose_name),
                    admin_url,
                    obj,
                )
            )
    return context