private static Set<TopicPartition> readTopicPartitions(final DataInputStream in,
                                                           final Map<Integer, String> topicIndexDict) throws IOException {
        final int numPartitions = in.readInt();
        final Set<TopicPartition> partitions = new HashSet<>(numPartitions);
        for (int j = 0; j < numPartitions; j++) {
            partitions.add(new TopicPartition(topicIndexDict.get(in.readInt()), in.readInt()));
        }
        return partitions;
    }
@throws TaskAssignmentException if method fails to decode the data or if the data version is unknown
streams/src/main/java/org/apache/kafka/streams/processor/internals/assignment/AssignmentInfo.java