def add_txn_num!(command)
      command.tap do |c|
        c[:txnNumber] = BSON::Int64.new(@server_session.txn_num) if in_transaction?
      end
    end
def add_txn_num!(command)
      command.tap do |c|
        c[:txnNumber] = BSON::Int64.new(@server_session.txn_num) if in_transaction?
      end
    end
Add the transaction number to a command document if applicable.

 @example
   session.add_txn_num!(cmd)

 @return [ Hash, BSON::Document ] The command document.

 @since 2.6.0
 @api private