private static void validateActiveTaskEncoding(final List<TopicPartition> partitions, final AssignmentInfo info, final String logPrefix) {
        // the number of assigned partitions should be the same as number of active tasks, which
        // could be duplicated if one task has more than one assigned partitions
        if (partitions.size() != info.activeTasks().size()) {
            throw new TaskAssignmentException(
                String.format(
                    "%sNumber of assigned partitions %d is not equal to "
                        + "the number of active taskIds %d, assignmentInfo=%s",
                    logPrefix, partitions.size(),
                    info.activeTasks().size(), info
                )
            );
        }
    }
Verify that this client's host info was included in the map returned in the assignment, and trigger a
rebalance if not. This may be necessary when using static membership, as a rejoining client will be handed
back its original assignment to avoid an unnecessary rebalance. If the client's endpoint has changed, we need
to force a rebalance for the other members in the group to get the updated host info for this client.

@param groupHostInfo the HostInfo of all clients in the group
@return false if the current host info does not match that in the group assignment
streams/src/main/java/org/apache/kafka/streams/processor/internals/StreamsPartitionAssignor.java