code: def _try_exec_task(self, task_f, *args):
      # temporary workaround for M1 build
      import grpc
  
      retry = 0
      while retry < self.retry_count:
          if self._needs_reconnect:
              try:
                  self._client().reconnect()
                  self._needs_reconnect = False
              except Exception:
                  retry += 1
                  time.sleep(self.retry_interval)
                  continue
  
          try:
              task_f(*args)
              return True
          except grpc.RpcError as e:
              if e.code() != grpc.StatusCode.UNAVAILABLE:
                  raise e
              self._needs_reconnect = True
  
              retry += 1
              time.sleep(self.retry_interval)
              logger.warning(
                  f"Remote Server is unavailable, please check network connection: {e}."
              )
  
      return False
  
file_path: aim/aim/ext/transport/rpc_queue.py
imports: import time
  import queue
  import logging
  import threading
  import weakref
label_desc: Use image node_id 4 for calling the RpcQueueWithRetry obj's underlying member method code with example usage: obj._try_exec_task(task_f) and returns: False, True