public TopicsImage apply() {
        ImmutableMap<Uuid, TopicImage> newTopicsById = image.topicsById();
        ImmutableMap<String, TopicImage> newTopicsByName = image.topicsByName();
        // apply all the deletes
        for (Uuid topicId: deletedTopicIds) {
            // it was deleted, so we have to remove it from the maps
            TopicImage originalTopicToBeDeleted = image.topicsById().get(topicId);
            if (originalTopicToBeDeleted == null) {
                throw new IllegalStateException("Missing topic id " + topicId);
            } else {
                newTopicsById = newTopicsById.removed(topicId);
                newTopicsByName = newTopicsByName.removed(originalTopicToBeDeleted.name());
            }
        }
        // apply all the updates/additions
        for (Map.Entry<Uuid, TopicDelta> entry: changedTopics.entrySet()) {
            Uuid topicId = entry.getKey();
            TopicImage newTopicToBeAddedOrUpdated = entry.getValue().apply();
            // put new information into the maps
            String topicName = newTopicToBeAddedOrUpdated.name();
            newTopicsById = newTopicsById.updated(topicId, newTopicToBeAddedOrUpdated);
            newTopicsByName = newTopicsByName.updated(topicName, newTopicToBeAddedOrUpdated);
        }
        return new TopicsImage(newTopicsById, newTopicsByName);
    }
The IDs of topics that exist in the image but that have been deleted. Note that if
a topic does not exist in the image, it will also not exist in this set. Topics
that are created and then deleted within the same delta will leave no trace.
metadata/src/main/java/org/apache/kafka/image/TopicsDelta.java