public Send build() {
        flushPendingSend();

        if (sends.size() == 1) {
            return sends.poll();
        } else {
            return new MultiRecordsSend(sends, sizeOfSends);
        }
    }
Write a record set. The underlying record data will be retained
in the result of {@link #build()}. See {@link BaseRecords#toSend()}.

@param records the records to write
clients/src/main/java/org/apache/kafka/common/protocol/SendBuilder.java