code: def nretry(func):
      """retry connection"""
  
      def wrapper(self, *args, **kwargs):
          """wrapper"""
          res = None
          exception = None
          for ntry in range(10):
              try:
                  res = func(self, *args, **kwargs)
                  exception = None
                  break
              except Exception as e:
                  LOGGER.error(
                      "function %s error" % func.__name__, exc_info=True
                  )
                  exception = e
                  time.sleep(1)
  
          if exception is not None:
              LOGGER.debug(f"failed", exc_info=exception)
              raise exception
  
          return res
  
      return wrapper
  
label_desc: Use image node_id 1 for calling a global function with example usage: nretry(func) and returns: wrapper, res