code: def _reset(self, force=False):
          
          if not self._closed and (force or self._transaction):
              try:
                  self.rollback()
              except Exception:
                  pass
docs: Reset a tough connection.
  
          Rollback if forced or the connection was in a transaction.