'Returns a fuzzy match for lang_code'

def _fuzzy_match(self, lang_code):

    match = None
    if (lang_code in self.released_langs):
        match = lang_code
    else:
        lang_prefix = lang_code.partition('-')[0]
        for released_lang in self.released_langs:
            released_prefix = released_lang.partition('-')[0]
            if (lang_prefix == released_prefix):
                match = released_lang
    return match
