def locale_synonyms(main_locale, locale_alias):
    language_code = main_locale[0:2]
    if language_code not in LOCALE_SYNONYMS:
        return False
    alternatives = LOCALE_SYNONYMS[language_code]
    if isinstance(alternatives[0], basestring):
        return main_locale in alternatives and locale_alias in alternatives
    else:
        result = False
        for subgroup in alternatives:
            if main_locale in subgroup:
                result = locale_alias in subgroup
                break
        return result
Called when stream connection times out
dataset/ETHPy150Open bigmlcom/python/bigml/util.py/locale_synonyms--crossover with--dataset/ETHPy150Open appdotnet/ADNpy/adnpy/stream.py/StreamListener.on_timeout