def METHOD_NAME(self, instance):
    if is_suspended(instance):
        actions = [
            (
                self._view_href(instance, 'resume_and_rejudge'),
                _("Resume and rejudge"),
                'POST',
            ),
            (
                self._view_href(instance, 'resume_and_clear'),
                _("Resume and clear queue"),
                'POST',
            ),
        ]
    else:
        actions = [
            (
                self._view_href(instance, 'suspend_all'),
                _("Suspend all tests"),
                'POST',
            ),
            (
                self._view_href(instance, 'suspend_all_but_init'),
                _("Suspend final tests"),
                'POST',
            ),
        ]
    return (
        super(SuspendJudgeProblemInstanceAdminMixin, self).METHOD_NAME(instance)
        + actions
    )