code: def _extract_results(self, stream_vis):
      stream_items, clear_current, clear_history = [], False, False
      while not stream_vis._pending_items.empty():
          stream_item = stream_vis._pending_items.get()
          if stream_item.stream_reset:
              utils.debug_log("Stream reset", stream_item.stream_name)
              stream_items.clear()  # no need to process these events
              clear_current, clear_history = True, True
          else:
              # check if there was an exception
              if stream_item.exception is not None:
                  # TODO: need better handling here?
                  print(stream_item.exception, file=sys.stderr)
                  raise stream_item.exception
  
              # state management for _clear_pending
              # if we need to clear plot before putting in data, do so
              if stream_vis._clear_pending:
                  stream_items.clear()
                  clear_current = True
                  stream_vis._clear_pending = False
              if stream_vis.clear_after_each or (
                  stream_item.ended and stream_vis.clear_after_end
              ):
                  stream_vis._clear_pending = True
  
              stream_items.append(stream_item)
  
      return stream_items, clear_current, clear_history
  
imports: import sys, time, threading, queue, functools
  from typing import Any
  from types import MethodType
  from abc import ABCMeta, abstractmethod
  from .lv_types import StreamVisInfo, StreamItem
  from .None import utils
  from .stream import Stream
label_desc: Use image node_id 7 for calling the VisBase obj's underlying member method code with example usage: obj._extract_results(stream_vis) and returns: stream_items,  clear_current,  clear_history