code: def exit(self):
      self.exit_flag = True
  
file_path: PARL/parl/remote/grpc_heartbeat/heartbeat_client.py
imports: import os
  import grpc
  import time
  import threading
  from parl.remote import remote_constants
  from parl.remote.grpc_heartbeat import heartbeat_pb2
  from parl.remote.grpc_heartbeat import heartbeat_pb2_grpc
  from parl.utils import logger
label_desc: Use image node_id 2 for calling the HeartbeatClientThread obj's underlying member method code with example usage: obj.exit() without return types