def METHOD_NAME(self, input, **opts):
    try:
        logger.info("Exporting raster {} with options: {}".format(input, json.dumps(opts)))
        tmpfile = tempfile.mktemp('_raster.{}'.format(extension_for_export_format(opts.get('format', 'gtiff'))), dir=settings.MEDIA_TMP)
        export_raster_sync(input, tmpfile, **opts)
        result = {'file': tmpfile}
        if settings.TESTING:
            TestSafeAsyncResult.set(self.request.id, result)
        return result
    except Exception as e:
        logger.error(str(e))
        return {'error': str(e)}