code: def wait(self, container_id):
          
          logger.info("waiting for container '%s' to finish", container_id)
          logger.debug("container = '%s'", container_id)
          response = self.d.wait(container_id)  # returns exit code as int
          logger.debug("container finished with exit code %s", response)
          return response
docs: wait for container to finish the job (may run infinitely)
  
          :param container_id: str
          :return: int, exit code