code: def test_gpu_worker_exit(self):
      master = Master(port=self.port, device="gpu")
      th = threading.Thread(target=master.run)
      th.start()
      time.sleep(10)
      self.add_worker(n_cpu=0, gpu="0,1")
  
      for _ in range(10):
          if master.gpu_num == 2:
              break
          time.sleep(5)
      self.assertEqual(master.gpu_num, 2)
      self.remove_all_workers()
  
      for _ in range(10):
          if master.gpu_num == 0:
              break
          time.sleep(10)
      self.assertEqual(master.gpu_num, 0)
  
      master.exit()
  
file_path: PARL/parl/remote/tests/gpu/worker_test.py
imports: import unittest
  import parl
  from parl.remote.master import Master
  from parl.remote.worker import Worker
  import time
  import threading
  from parl.remote.client import disconnect
  from parl.utils import logger, get_free_tcp_port
  from parl.utils.test_utils import XparlTestCase
label_desc: Use image node_id 4 for calling the TestCluster obj's underlying member method code with example usage: obj.test_gpu_worker_exit() without return types