Rollback the current transaction.

        :raise: :class:`.TransactionError` if no transaction is currently open

def rollback_transaction(self):
        """ Rollback the current transaction.

        :raise: :class:`.TransactionError` if no transaction is currently open
        """
        self._assert_open()
        if not self._transaction:
            raise TransactionError("No transaction to rollback")
        cx = self._connection
        if cx:
            metadata = {}
            try:
                cx.rollback(on_success=metadata.update)
            finally:
                self._disconnect(sync=True)
                self._transaction = None