code: public final Transaction beginTransaction(SessionName session, TransactionOptions options) {
  
      BeginTransactionRequest request =
          BeginTransactionRequest.newBuilder()
              .setSession(session == null ? null : session.toString())
              .setOptions(options)
              .build();
      return beginTransaction(request);
    }
docs: Begins a new transaction. This step can often be skipped:
  [Read][google.spanner.v1.Spanner.Read], [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql] and
  [Commit][google.spanner.v1.Spanner.Commit] can begin a new transaction as a side-effect.
  
  <p>Sample code:
  
  <pre><code>
  try (SpannerClient spannerClient = SpannerClient.create()) {
  SessionName session = SessionName.of("[PROJECT]", "[INSTANCE]", "[DATABASE]", "[SESSION]");
  TransactionOptions options = TransactionOptions.newBuilder().build();
  Transaction response = spannerClient.beginTransaction(session, options);
  }
  </code></pre>
  
  @param session Required. The session in which the transaction runs.
  @param options Required. Options for the new transaction.
  @throws com.google.api.gax.rpc.ApiException if the remote call fails