public Set<String> removeSubscription(
      @Nullable final String consumerId, final Set<String> topics) {
    if (Objects.isNull(consumerId)) {
      return consumerIdToConsumerMeta.keySet().stream()
          .map(id -> removeSubscriptionInternal(id, topics))
          .flatMap(Set::stream)
          .collect(Collectors.toSet());
    }
    return removeSubscriptionInternal(consumerId, topics);
  }
@return topics subscribed by no consumers in this group after this removal.
@param consumerId if null, remove subscriptions of topics for all consumers
iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/subscription/meta/consumer/ConsumerGroupMeta.java