dissect_kafka_create_topics_request_replica_assignment(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
                                                       int offset, kafka_api_version_t api_version)
{
    proto_item *subti;
    proto_tree *subtree;
    kafka_partition_t partition;

    subtree = proto_tree_add_subtree(tree, tvb, offset, -1,
                                     ett_kafka_replica_assignment,
                                     &subti, "Replica Assignment");

    /* partition_id */
    dissect_kafka_partition_id_ret(tvb, pinfo, subtree, offset, &partition);

    /* [replica] */
    offset = dissect_kafka_array(subtree, tvb, pinfo, offset, api_version >= 5, api_version,
                                 &dissect_kafka_create_topics_request_replica, NULL);

    if (api_version >= 5) {
        offset = dissect_kafka_tagged_fields(tvb, pinfo, tree, offset, 0);
    }

    proto_item_set_end(subti, tvb, offset);
    proto_item_append_text(subti, " (Partition-ID=%d)",
                           partition);

    return offset;
}
dissect_kafka_create_topics_request_replica_assignment(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
                                                       int offset, kafka_api_version_t api_version)
{
    proto_item *subti;
    proto_tree *subtree;
    kafka_partition_t partition;

    subtree = proto_tree_add_subtree(tree, tvb, offset, -1,
                                     ett_kafka_replica_assignment,
                                     &subti, "Replica Assignment");

     
    dissect_kafka_partition_id_ret(tvb, pinfo, subtree, offset, &partition);

     
    offset = dissect_kafka_array(subtree, tvb, pinfo, offset, api_version >= 5, api_version,
                                 &dissect_kafka_create_topics_request_replica, NULL);

    if (api_version >= 5) {
        offset = dissect_kafka_tagged_fields(tvb, pinfo, tree, offset, 0);
    }

    proto_item_set_end(subti, tvb, offset);
    proto_item_append_text(subti, " (Partition-ID=%d)",
                           partition);

    return offset;
}