<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def retry_and_reset(fn):
 """ Decorator used to make sure, that operation on ZEO object will be retried, if there is ``ConnectionStateError`` exception. """

    @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