human
I wrote the below code

    def render_to_csv_renderer(function):
        @wraps(function)
        def render_to_csv_renderer_wrapper(request, *args, **kwargs):
            '\n                                                The    header    row    are    all    the    keys    from    all    the    context_key    dicts.\n                                                The    rows    are    accumulations    of    data    across    all    the    context_key    dicts,\n                                                            one    row    per    entry    in    the    dict.\n                                                '
            output = function(request, *args, **kwargs)
            if ((not isinstance(output, dict)) or (request.GET.get('format') != 'csv')):
                return output
            output_string = StringIO()
            writer = csv.writer(output_string, delimiter=delimiter, quoting=csv.QUOTE_MINIMAL)
            if (order == 'stacked'):
                ri = 0
                for context_key in context_keys:
                    for (row_label, row_data) in output[context_key].iteritems():
                        if (ri == 0):
                            col_labels = ([key_label] + row_data.keys())
                            writer.writerow(col_labels)
                        writer.writerow(([row_label] + row_data.values()))
                        ri += 1
                    writer.writerow([])
            elif (order == 'neighbors'):
                row_labels = output[context_keys[0]].keys()
                col_labels = ([key_label] + [kk for k in context_keys for kk in output[k][row_labels[0]].keys()])
                writer.writerow(col_labels)
                for (ri, row_label) in enumerate(row_labels):
                    row_data = [row_label]
                    for k in context_keys:
                        row_data += output[k][row_label].values()
                    writer.writerow(row_data)
            return CsvResponse(output_string.getvalue())
        return render_to_csv_renderer_wrapper
  ...

What's a good function header?

=====
Here's a good function header?
assistant
#Here's a good function header.

def render_to_csv(context_keys, delimiter=',', key_label='key', order='stacked'):