def get_language_from_json(language, key):
    """Finds the given language in a json file."""

    file_name = os.path.join(
        os.path.dirname(__file__),
        'languages',
        '{0}.json').format(key.lower())

    try:
        with open(file_name, 'r', encoding='utf-8') as fh:
            languages = json.loads(fh.read())
            if languages.values() in language:
                return language
            if languages.get(language):
                return languages[language]
    except:
        pass

    return None
dataset/ETHPy150Open wakatime/sublime-wakatime/packages/wakatime/stats.py/get_language_from_json/swapped operands of `in`