public synchronized ProcessorTopology buildGlobalStateTopology() {
        Objects.requireNonNull(applicationId, "topology has not completed optimization");

        final Set<String> globalGroups = globalNodeGroups();
        if (globalGroups.isEmpty()) {
            return null;
        }
        return build(globalGroups);
    }
Builds the topology for any global state stores
@return ProcessorTopology of global state
streams/src/main/java/org/apache/kafka/streams/processor/internals/InternalTopologyBuilder.java