@SuppressWarnings("PMD.UnusedLocalVariable")
    public <R, X extends Exception> R inTransaction(TransactionIsolationLevel level, HandleCallback<R, X> callback) throws X {
        if (isInTransaction()) {
            TransactionIsolationLevel currentLevel = getTransactionIsolationLevel();
            if (currentLevel != level && level != TransactionIsolationLevel.UNKNOWN) {
                throw new TransactionException(
                        "Tried to execute nested transaction with isolation level " + level + ", "
                                + "but already running in a transaction with isolation level " + currentLevel + ".");
            }
            return callback.withHandle(this);
        }

        try (SetTransactionIsolation isolation = new SetTransactionIsolation(level)) {
            return transactionHandler.inTransaction(this, level, callback);
        }
    }
Executes <code>callback</code> in a transaction, and returns the result of the callback.
<p>
This form accepts a transaction isolation level which will be applied to the connection
for the scope of this transaction, after which the original isolation level will be restored.
</p>

@param level    the transaction isolation level which will be applied to the connection for the scope of this
                transaction, after which the original isolation level will be restored.
@param callback a callback which will receive an open handle, in a transaction.
@param <R>      type returned by callback
@param <X>      exception type thrown by the callback, if any
@return value returned from the callback
@throws X any exception thrown by the callback
core/src/main/java/org/jdbi/v3/core/Handle.java