public static <V> VersionedRecord<V> deserializeVersionedRecord(final StateSerdes<?, V> serdes, final VersionedRecord<byte[]> rawVersionedRecord) {
        final Deserializer<V> valueDeserializer = serdes.valueDeserializer();
        final V value = valueDeserializer.deserialize(serdes.topic(), rawVersionedRecord.value());
        return rawVersionedRecord.validTo().isPresent() ? new VersionedRecord<>(value, rawVersionedRecord.timestamp(), rawVersionedRecord.validTo().get())
                                                        : new VersionedRecord<>(value, rawVersionedRecord.timestamp());
    }
a utility interface to facilitate stores' query dispatch logic,
allowing them to generically store query execution logic as the values
in a map.
streams/src/main/java/org/apache/kafka/streams/state/internals/StoreQueryUtils.java