code: def rollback(self):
          
          try:
              if self._autocommit:
                  return
  
              if not self._conn or not self._conn.is_connected():
                  return
  
              if not self._conn.tds72_transaction:
                  return
  
              self._main_cursor._rollback(cont=True,
                                          isolation_level=self._isolation_level)
          except socket.error as e:
              if e.errno in (errno.ENETRESET, errno.ECONNRESET, errno.EPIPE):
                  return
              self._conn.close()
              raise
          except ClosedConnectionError:
              pass
docs: Roll back transaction which is currently in progress.