def lang(lg): global __istat__ if __istat__ is None: downloader = jsonstat.Downloader(cache_dir="./istat_cached", time_to_live=None) __istat__ = IstatRoot(downloader, lang=lg) __istat__.lang(lg) return lg