code: def retry_and_reset(fn):
      
      @wraps(fn)
      def retry_and_reset_decorator(*args, **kwargs):
          obj = kwargs.get("self", None)
  
          if not obj:
              obj = args[0]
  
          try:
              return fn(*args, **kwargs)
          except ConnectionStateError:
              obj._on_close_callback()
  
          return fn(*args, **kwargs)
  
      return retry_and_reset_decorator
docs: Decorator used to make sure, that operation on ZEO object will be retried,
      if there is ``ConnectionStateError`` exception.