def _convert_new_topic_request(new_topic):
        """
        Build the tuple required by CreateTopicsRequest from a NewTopic object.

        Arguments:
            new_topic: A NewTopic instance containing name, partition count, replication factor,
                          replica assignments, and config entries.

        Returns:
            A tuple in the form:
                 (topic_name, num_partitions, replication_factor, [(partition_id, [replicas])...],
                  [(config_key, config_value)...])
        """
        return (
            new_topic.name,
            new_topic.num_partitions,
            new_topic.replication_factor,
            [
                (partition_id, replicas) for partition_id, replicas in new_topic.replica_assignments.items()
            ],
            [
                (config_key, config_value) for config_key, config_value in new_topic.topic_configs.items()
            ]
        )

        Build the tuple required by CreateTopicsRequest from a NewTopic object.

        Arguments:
            new_topic: A NewTopic instance containing name, partition count, replication factor,
                          replica assignments, and config entries.

        Returns:
            A tuple in the form:
                 (topic_name, num_partitions, replication_factor, [(partition_id, [replicas])...],
                  [(config_key, config_value)...])
        
kafka/admin/client.py