def teardown_build(self, build_id=None):
        if self._current_build_id is None:
            raise BadRequestError('Tried to teardown a build but no build is active on this slave.')

        if build_id is not None and build_id != self._current_build_id:
            raise BadRequestError('Tried to teardown build {}, '
                                  'but slave is running build {}!'.format(build_id, self._current_build_id))
        SafeThread(
            target=self._async_teardown_build,
            name='Bld{}-Teardwn'.format(build_id)
        ).start()
Called at the end of each build on each slave before it reports back to the master that it is idle again.
dataset/ETHPy150Open box/ClusterRunner/app/slave/cluster_slave.py/ClusterSlave.teardown_build