class_docstr: Consume tfevents from a priority queue.
  
  There should always only be one of these per run_manager.  We wait for 10 seconds of
  queued events to reduce the chance of multiple tfevent files triggering out of order
  steps.
class_docstr_tok: ["Consume","tfevents","from","a","priority","queue",".","There","should","always","only","be","one","of","these","per","run_manager",".","We","wait","for","10","seconds","of","queued","events","to","reduce","the","chance","of","multiple","tfevent","files","triggering","out","of","order","steps","."]
code: def finish(self) -> None:
      self._delay = 0
      self._shutdown.set()
      self._thread.join()
      while not self._queue.empty():
          event = self._queue.get(True, 1)
          if event:
              self._handle_event(event, history=self.tb_history)
              items = self.tb_history._get_and_reset()
              for item in items:
                  self._save_row(
                      item,
                  )
  
imports: import glob
  import logging
  import os
  import queue
  import socket
  import sys
  import threading
  import time
  from typing import TYPE_CHECKING, Any, Dict, List, Optional
  import wandb
  from wandb import util
  from wandb.sdk.interface.interface import GlobStr
  from wandb.sdk.lib import filesystem
  from wandb.viz import CustomChart
  from .None import run
label_desc: Use image node_id 3 for calling the TBEventConsumer obj's underlying member method code with example usage: obj.finish() without return types