def _convert_create_partitions_request(topic_name, new_partitions):
        """Convert a NewPartitions object into the tuple format for CreatePartitionsRequest.

        Arguments:
            topic_name: The name of the existing topic.
            new_partitions: A NewPartitions instance with total_count and new_assignments.

        Returns:
            A tuple: (topic_name, (total_count, [list_of_assignments])).
        """
        return (
            topic_name,
            (
                new_partitions.total_count,
                new_partitions.new_assignments
            )
        )
Convert a NewPartitions object into the tuple format for CreatePartitionsRequest.

        Arguments:
            topic_name: The name of the existing topic.
            new_partitions: A NewPartitions instance with total_count and new_assignments.

        Returns:
            A tuple: (topic_name, (total_count, [list_of_assignments])).
        
kafka/admin/client.py