code: def _try_join_cancelled_thread(thread):
      
      thread.join(10)
      if thread.is_alive():
          logging.warning("Thread %s did not terminate within grace period after cancellation",
                          thread.name)
docs: Join a thread, but if the thread doesn't terminate for some time, ignore it
      instead of waiting infinitely.