code: def test_pool_kwarg(pool_typ):
      def f():
          sleep(0.01)
          return threading.get_ident()
  
      dsk = {("x", i): (f,) for i in range(30)}
      dsk["x"] = (len, (set, [("x", i) for i in range(len(dsk))]))
  
      with pool_typ(3) as pool:
          assert get(dsk, "x", pool=pool) == 3
  
imports: from __future__ import annotations
  import signal
  import sys
  import threading
  from concurrent.futures import ThreadPoolExecutor
  from multiprocessing.pool import ThreadPool
  from time import sleep, time
  import pytest
  import dask
  from dask.system import CPU_COUNT
  from dask.threaded import get
  from dask.utils_test import add, inc
label_desc: Use image node_id 8 for calling a global function with example usage: test_pool_kwarg(pool_typ) and returns: threading