def render(self, data, template=None):
        if not isinstance(data, (list, tuple)):
            data = [data]

        if len(data) == 0:
            return

        try:
            writer = CSVKitWriter(sys.stdout)
            for i, row in enumerate(data):
                if i == 0:
                    writer.writerow(row.serialize().keys())
                writer.writerow(row.serialize().values())
        except __HOLE__:
            # Handle pipes that could close before output is done.
            # See: http://stackoverflow.com/questions/15793886/
            try:
                sys.stdout.close()
            except IOError:
                pass
            try:
                sys.stderr.close()
            except IOError:
                pass
dataset/ETHPy150Open newsdev/nyt-clerk/clerk/ext_csv.py/CSVOutputHandler.render