code: def test_threaded():
      go = threading.Event()
      item = CachedCostItemWait(go)
  
      num_threads = 3
  
      orig_si = sys.getswitchinterval()
      sys.setswitchinterval(1e-6)
      try:
          tpr = concurrent.futures.ThreadPoolExecutor(
              max_workers=num_threads, thread_name_prefix="test"
          )
          futures = [
              tpr.submit(lambda: item.cost) for _ in range(num_threads)
          ]
          _, not_done = concurrent.futures.wait(futures)
          # "Threads not stopped"
          assert len(not_done) == 0
      finally:
          sys.setswitchinterval(orig_si)
  
      assert item.cost == 2
  
imports: import concurrent.futures
  import sys
  import threading
  import pytest
  from flash.core.serve._compat.cached_property import cached_property
  from flash.core.utilities.imports import _TOPIC_SERVE_AVAILABLE
label_desc: Use image node_id 3 for calling the TestCachedProperty obj's underlying member method code with example usage: obj.test_threaded() without return types