def METHOD_NAME(obj):
    if TestsPackage.objects.filter(problem=obj.problem).count() == 1:
        return _("Publish tests for %s") % obj.problem.short_name
    return _("Publish tests for %(problem_name)s (%(package_name)s)") % {
        'problem_name': obj.problem.short_name,
        'package_name': obj.name,
    }