private TopicPartitionState assignedStateOrNull(TopicPartition tp) {
        return this.assignment.stateValue(tp);
    }
Get the subscription topics for which metadata is required. For the leader, this will include
the union of the subscriptions of all group members. For followers, it is just that member's
subscription. This is used when querying topic metadata to detect the metadata changes which would
require rebalancing. The leader fetches metadata for all topics in the group so that it
can do the partition assignment (which requires at least partition counts for all topics
to be assigned).

@return The union of all subscribed topics in the group if this member is the leader
  of the current generation; otherwise it returns the same set as {@link #subscription()}
clients/src/main/java/org/apache/kafka/clients/consumer/internals/SubscriptionState.java