presto-main/src/main/java/io/prestosql/Session.java/Session/getRequiredTransactionId
class Session:    public TransactionId getRequiredTransactionId()
            throws NotInTransactionException
    {
        return transactionId.orElseThrow(NotInTransactionException::new);
    }