code: def monitor(self):
          
          # NOTE: This blocks; it is up to the calling code to call it
          #       in a separate thread.
  
          # Sleep for however long we should be waiting.
          time.sleep(self._settings.max_latency)
  
          _LOGGER.debug("Monitor is waking up")
          return self._commit()
docs: Commit this batch after sufficient time has elapsed.
  
          This simply sleeps for ``self._settings.max_latency`` seconds,
          and then calls commit unless the batch has already been committed.