public MetadataImage image() {
        return image;
    }
ImageReWriter writes a metadata image out to another metadata image.

There are a few reasons why you might want to do this. One is to obtain a MetadataDelta
object which contains everything in the image. Another is to translate an image from
one metadata version to another.
metadata/src/main/java/org/apache/kafka/image/writer/ImageReWriter.java