code: def __init__(self, with_lock=False, max_threads=8):
      object.__init__(self)
      self._Qin = queue.Queue()
      self._max_threads = max_threads
      self._n_works = 0
      self._Qerr = queue.Queue()
      if with_lock:
          self.lock = threading.Lock()
      else:
          self.lock = None
  
imports: import threading
  import queue
label_desc: Use image node_id 1 to create a new ThreadPool object from inherited base classes: object with example: obj = ThreadPool(with_lock, max_threads)