code: def _target_f(self):
      heartbeat_interval_counter = 0
      stability_check_interval_counter = 0
      # send initial heartbeat
      self._send_heartbeat()
  
      while True:
          if self._shutdown:
              break
  
          time.sleep(1)
          heartbeat_interval_counter += 1
          stability_check_interval_counter += 1
  
          if heartbeat_interval_counter > self._heartbeat_send_interval:
              self._send_heartbeat()
              heartbeat_interval_counter = 0
  
          if (
              stability_check_interval_counter
              > self._network_stability_check_interval
          ):
              self._check_network_state()
              stability_check_interval_counter = 0
  
imports: import datetime
  import logging
  import time
  import weakref
  from collections import Counter
  from threading import Thread
  from typing import Union
  import aim.ext.transport.proto.remote_router_pb2
label_desc: Use image node_id 5 for calling the RPCHeartbeatSender obj's underlying member method code with example usage: obj._target_f() without return types