code: def wait_until_done(self, timeout=None):
          
          start = datetime.now()
          if not self.__th:
              raise IndraDBRestResponseError("There is no thread waiting to "
                                             "complete.")
          self.__th.join(timeout)
          now = datetime.now()
          dt = now - start
          if self.__th.is_alive():
              logger.warning("Timed out after %0.3f seconds waiting for "
                             "statement load to complete." % dt.total_seconds())
              ret = False
          else:
              logger.info("Waited %0.3f seconds for statements to finish loading."
                          % dt.total_seconds())
              ret = True
          return ret
docs: Wait for the background load to complete.