def _free_slave_executor(self, slave):
        num_executors_in_use = slave.free_executor()
        if num_executors_in_use == 0:
            try:
                self._slaves_allocated.remove(slave)
            except __HOLE__:
                pass  # We have already deallocated this slave, no need to teardown
            else:
                slave.teardown()
dataset/ETHPy150Open box/ClusterRunner/app/master/build_scheduler.py/BuildScheduler._free_slave_executor