docstr: Tests that when the main processes dies, the process workers will kill themselves 
docstr_tok: ["Tests","that","when","the","main","processes","dies",",","the","process","workers","will","kill","themselves"]
code: def test_workers_die_when_main_process_dies(self):
      """Tests that when the main processes dies, the process workers will kill themselves"""
      manager = Manager()
      return_list = manager.list()
  
      def run_process_pool(return_list):
          pool = ProcessPool(1)
          pool.start(WorkerIdGeneratingWorker)
          return_list.append(pool._workers[0].pid)
          # We dont call pool.stop() and hence leave workers alive
  
      process = Process(target=run_process_pool, args=(return_list,))
      process.start()
      process.join()
      # The worker has now started
  
      worker_pid = return_list[0]
  
      for _ in range(20):
          worker_is_alive = pid_exists(worker_pid)
          if not worker_is_alive:
              break
          time.sleep(0.1)
      self.assertFalse(worker_is_alive)
  
imports: import time
  import unittest
  import numpy
  from multiprocessing import Process, Manager
  from psutil import pid_exists
  from petastorm.workers_pool import EmptyResultError
  from petastorm.workers_pool.dummy_pool import DummyPool
  from petastorm.workers_pool.process_pool import ProcessPool
  from petastorm.workers_pool.tests.stub_workers import CoeffMultiplierWorker, WorkerIdGeneratingWorker, WorkerMultiIdGeneratingWorker, SleepyWorkerIdGeneratingWorker, ExceptionGeneratingWorker_5, PreprogrammedReturnValueWorker
  from petastorm.workers_pool.thread_pool import ThreadPool
label_desc: Use image node_id 20 for calling the TestWorkersPool obj's underlying member method code with example usage: obj.test_workers_die_when_main_process_dies() without return types