def run(self, execution_id):
        execution = self._get_execution(execution_id)

        if execution.status != Execution.ABORTED:
            failed = running = False
            for command in execution.commands.all():
                for server in command.servers.all():
                    if server.status == server.RUNNING:
                        running = True
                    elif [None, server.FAILED] in server.status:
                        failed = True
            if not running:
                if failed:
                    execution.status = execution.FAILED
                else:
                    execution.status = execution.SUCCESS
                execution.save_end()
                self.finalize(execution, execution_id)
        else:
            self.finalize(execution, execution_id)
dataset/ETHPy150Open gunnery/gunnery/gunnery/backend/tasks.py/ExecutionTaskFinish.run/swapped operands of `in`