def _print_csv(result):
if type(result) is not list:<EOL><INDENT>raise TypeError("<STR_LIT>")<EOL><DEDENT>first_line = result[<NUM_LIT:0>]<EOL>w = csv.DictWriter(sys.stdout, fieldnames=sorted(first_line.keys()))<EOL>w.writeheader()<EOL>for line in result:<EOL><INDENT>w.writerow(line)<EOL><DEDENT>
Print a JSON list of JSON objects in CSV format.