@wrap_exception('Unable to kill Docker container')
    def kill_container(self, container_id):
        logger.debug('Killing container with ID %s', container_id)
        with closing(self._create_connection()) as conn:
            conn.request('POST', '/containers/%s/kill' % container_id)
            kill_response = conn.getresponse()
            if kill_response.status == 500:
                raise DockerException(kill_response.read())
dataset/ETHPy150Open codalab/codalab-cli/worker/docker_client.py/DockerClient.kill_container/original