def METHOD_NAME(self, exception: Exception):
    logging.warning('Extractor port already in use -> trying to remove old container...')
    for running_container in DOCKER_CLIENT.containers.list():
        if self._is_extractor_container(running_container) and self._has_same_port(running_container):
            self._remove_container(running_container)
            self._start_container()
            return
    logging.error('Could not free extractor port')
    raise RuntimeError('Could not create extractor container') from exception