<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _reset(self, force=False):
 """Reset a tough connection. Rollback if forced or the connection was in a transaction. """

        if not self._closed and (force or self._transaction):
            try:
                self.rollback()
            except Exception:
                pass