def METHOD_NAME(self, data):
    language = data.get("language", "")
    if language:
        from .languages import LANGUAGES
        for _cnt in LANGUAGES:
            if language == _cnt[1]:
                language = _cnt[0]
                break
    return language