'Transfer the record batches into a list of produce requests on a
per-node basis.
Arguments:
collated: {node_id: [RecordBatch]}
Returns:
dict: {node_id: ProduceRequest} (version depends on api_version)'

def _create_produce_requests(self, collated):

    requests = {}
    for (node_id, batches) in six.iteritems(collated):
        requests[node_id] = self._produce_request(node_id, self.config['acks'], self.config['request_timeout_ms'], batches)
    return requests
