public Collection<BatchMetadata> batchMetadata() {
        return Collections.unmodifiableCollection(batchMetadata);
    }
Check if the sequence number is in the range [start, end] (inclusive).
The range may wrap around the sequence space.
storage/src/main/java/org/apache/kafka/storage/internals/log/ProducerStateEntry.java