def METHOD_NAME(self, max_retries=-1, timeout=1):
    while max_retries:
        try:
            logging.info(
                "Check connection to "
                + self.service
                + " container at "
                + self.base_url
            )
            self.get()
            max_retries = 0
        except:
            logging.error(
                "Unable to reach " + self.service + " container at " + self.base_url
            )
            time.sleep(timeout)
            if max_retries >= 0:
                max_retries -= 1