code: def _check_network_state(self):
      def reset_responses():
          self._heartbeat_responses["fail"] = 0
          self._heartbeat_responses["success"] = 0
  
      if not self._heartbeat_responses["fail"]:
          reset_responses()
          return
  
      if (
          self._heartbeat_responses["success"]
          and not self._network_unstable_warned
      ):
          self._network_unstable_warned = True
          logger.warning(
              RPCHeartbeatSender.NETWORK_UNSTABLE_WARNING_TEMPLATE.format(
                  self._remote_client().uri,
                  self._remote_client().remote_path,
              )
          )
          reset_responses()
          return
  
      if not self._network_absent_warned:
          self._network_absent_warned = True
          logger.warning(
              RPCHeartbeatSender.NETWORK_ABSENT_WARNING_TEMPLATE.format(
                  self._remote_client().uri,
                  self._remote_client().remote_path,
              )
          )
  
      reset_responses()
  
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 6 for calling the RPCHeartbeatSender obj's underlying member method code with example usage: obj._check_network_state() without return types