def METHOD_NAME(result_dump, format):
    ext = ""
    if format == "GeoJSON":
        ext = "json"
    elif format == "GPKG":
        ext = "gpkg"
    elif format == "DXF":
        ext = "dxf"
    elif format == "ESRI Shapefile":
        ext = "shp"
    with open("output.json", 'w+') as output:
        output.write(result_dump)
    if ext != "json":
        subprocess.check_call(["ogr2ogr", "-f", format, "output.%s" % ext, "output.json"], stdout=subprocess.DEVNULL)
    if path.isfile("output.%s" % ext):
        if format == "ESRI Shapefile":
            ext="zip"
            makedirs("changes")
            contour_files = glob.glob("output.*")
            for cf in contour_files:
                shutil.move(cf, path.join("changes", path.basename(cf)))
            shutil.make_archive('output', 'zip', 'changes/')
        print(path.join(getcwd(), "output.%s" % ext))
    else:
        print("error")