@Override
        public int compareTo(final Subtopology other) {
            if (nodeGroupId != other.nodeGroupId) {
                return Integer.compare(nodeGroupId, other.nodeGroupId);
            }
            if (namedTopology == null) {
                return other.namedTopology == null ? 0 : -1;
            }
            if (other.namedTopology == null) {
                return 1;
            }

            // Both not null
            return namedTopology.compareTo(other.namedTopology);
        }
@return the InternalTopologyBuilder for the NamedTopology with the given {@code topologyName}
        or the builder for a regular Topology if {@code topologyName} is {@code null},
        else returns {@code null} if {@code topologyName} is non-null but no such NamedTopology exists
streams/src/main/java/org/apache/kafka/streams/processor/internals/TopologyMetadata.java