code: def flush(self):
          
          if self._cache is None:
              return []
          with self._cache as c:
              flushed_items = list(c.out_deque)
              c.out_deque.clear()
              cached_reqs = [item.extract_request() for item in flushed_items]
              cached_reqs = [req for req in cached_reqs if req is not None]
              return cached_reqs
docs: Flushes this instance's cache.
  
          The driver of this instance should call this method every
          `flush_interval`.
  
          Returns:
            list['CheckRequest']: corresponding to CheckRequests that were
            pending