def get_writer(format):
    try:
        return {
            Format.CSV: writers.CsvExportWriter,
            Format.HTML: writers.HtmlExportWriter,
            Format.ZIPPED_HTML: writers.ZippedHtmlExportWriter,
            Format.JSON: writers.JsonExportWriter,
            Format.XLS: writers.Excel2003ExportWriter,
            Format.XLS_2007: writers.Excel2007ExportWriter,
            Format.UNZIPPED_CSV: writers.UnzippedCsvExportWriter,
            Format.CDISC_ODM: writers.CdiscOdmExportWriter,
            Format.PYTHON_DICT: writers.PythonDictWriter,
        }[format]()
    except __HOLE__:
        raise UnsupportedExportFormat("Unsupported export format: %s!" % format)
dataset/ETHPy150Open dimagi/commcare-hq/corehq/ex-submodules/couchexport/export.py/get_writer