code: public CompletableFuture<Pair<VersionedTransactionData, List<StreamSegmentRecord>>> createTxn(final String scope,
                                                                                        final String stream,
                                                                                        final long lease,
                                                                                        final OperationContext contextOpt) {
          final OperationContext context = getNonNullOperationContext(scope, stream, contextOpt);
          return createTxnBody(scope, stream, lease, context);
      }
docs: Create transaction.
  
  @param scope              stream scope.
  @param stream             stream name.
  @param lease              Time for which transaction shall remain open with sending any heartbeat.
  the scaling operation is initiated on the txn stream.
  @param contextOpt         operational context
  @return transaction id.