code: def test_heartbeat_client_will_exit_if_server_is_not_started(self):
      def client_exit_func():
          print("exit heartbeat client")
          self.client_exited = True
  
      heartbeat_client_thread = HeartbeatServerThread(client_exit_func)
      heartbeat_client_thread.start()
  
      time.sleep(remote_constants.HEARTBEAT_RCVTIMEO_S * 2)
  
      assert not heartbeat_client_thread.is_alive()
      assert self.client_exited == True
  
file_path: PARL/parl/remote/grpc_heartbeat/tests/heartbeat_test.py
imports: import time
  import unittest
  from parl.remote.grpc_heartbeat import HeartbeatServerThread
  from parl.remote.grpc_heartbeat import HeartbeatClientThread
  from parl.remote import remote_constants
label_desc: Use image node_id 4 for calling the TestHeartbeat obj's underlying member method code with example usage: obj.test_heartbeat_client_will_exit_if_server_is_not_started() without return types