def METHOD_NAME(start_date, end_date):
    """Get a list of (locale, visits) tuples sorted descending by visits."""
    cache_key = "locales_sorted_by_visits:{start}:{end}".format(start=start_date, end=end_date)
    sorted_locales = cache.get(cache_key)
    if sorted_locales is None:
        try:
            results = visitors_by_locale(start_date, end_date)
            locales_and_visits = list(results.items())
            sorted_locales = list(reversed(sorted(locales_and_visits, key=lambda x: x[1])))
            cache.add(cache_key, sorted_locales, settings.CACHE_LONG_TIMEOUT)
        except (GoogleAPIError, GoogleAuthError, OpenSSLError):
            # Just return all locales with 0s for visits.
            log.exception(
                "Something went wrong getting visitors by locale "
                "from Google Analytics. Nobody got a 500 though."
            )
            sorted_locales = [(lang, 0) for lang in settings.SUMO_LANGUAGES]
    return sorted_locales