def delete(self):
if not self.is_created():<EOL><INDENT>LOG.debug("<STR_LIT>")<EOL>return<EOL><DEDENT>try:<EOL><INDENT>self.docker_client.containers.get(self.id).remove(force=True)  <EOL><DEDENT>except docker.errors.NotFound:<EOL><INDENT>LOG.debug("<STR_LIT>", self.id)<EOL><DEDENT>except docker.errors.APIError as ex:<EOL><INDENT>msg = str(ex)<EOL>removal_in_progress = ("<STR_LIT>" in msg) and ("<STR_LIT>" in msg)<EOL>if not removal_in_progress:<EOL><INDENT>raise ex<EOL><DEDENT><DEDENT>self.id = None<EOL>
Removes a container that was created earlier.