code: def _adjust_thread_count(self):
      # When the executor gets lost, the weakref callback will wake up
      # the worker threads.
      def weakref_cb(_, q=self._work_queue):
          q.put(None)
  
      # TODO(bquinlan): Should avoid creating new threads if there are more
      # idle threads than items in the work queue.
      num_threads = len(self._threads)
      if num_threads < self._max_workers:
          thread_name = "%s_%d" % (
              self._thread_name_prefix or self,
              num_threads,
          )
          t = threading.Thread(
              name=thread_name,
              target=_worker,
              args=(weakref.ref(self, weakref_cb), self._work_queue),
          )
          t.daemon = True
          t.start()
          self._threads.add(t)
          _threads_queues[t] = self._work_queue
  
file_path: distributed/distributed/_concurrent_futures_thread.py
imports: from __future__ import annotations
  import atexit
  import itertools
  import os
  import queue
  import threading
  import weakref
  from concurrent.futures import _base
label_desc: Use image node_id 3 for calling the ThreadPoolExecutor obj's underlying member method code with example usage: obj._adjust_thread_count() without return types