public Optional<File> fetchSnapshot(long offset) {
        return Optional.ofNullable(snapshots.get(offset)).map(x -> x.file());
    }
Deletes the producer snapshot files until the given offset (exclusive) in a thread safe manner.

@param offset offset number
@throws IOException if any IOException occurs while deleting the files.
storage/src/main/java/org/apache/kafka/storage/internals/log/ProducerStateManager.java