def __call__(self, admin_class, request, queryset):
        errors = defaultdict(list)
        successfully_executed = []
        for instance in queryset:
            try:
                self.validate(instance)
            except __HOLE__ as e:
                errors[str(e)].append(instance)
            else:
                self.executor.execute(instance)
                successfully_executed.append(instance)

        if successfully_executed:
            message = 'Operation was successfully scheduled for %s instances: %s' % (
                len(successfully_executed), ', '.join([str(i) for i in successfully_executed]))
            admin_class.message_user(request, message)

        for error, instances in errors.items():
            message = 'Failed to schedule operation for %s instances: %s. Error: %s' % (
                len(instances), ', '.join([str(i) for i in instances]), error)
            admin_class.message_user(request, message, level=messages.ERROR)
dataset/ETHPy150Open opennode/nodeconductor/nodeconductor/core/admin.py/ExecutorAdminAction.__call__