def METHOD_NAME(sxng_tag_list):
    language_codes = []
    for sxng_tag in sorted(sxng_tag_list):
        sxng_locale: babel.Locale = babel.Locale.parse(sxng_tag, sep='-')
        flag = get_unicode_flag(sxng_locale) or ''
        item = (
            sxng_tag,
            sxng_locale.get_language_name().title(),
            sxng_locale.get_territory_name() or '',
            sxng_locale.english_name.split(' (')[0],
            UnicodeEscape(flag),
        )
        language_codes.append(item)
    language_codes = tuple(language_codes)
    with open(languages_file, 'w', encoding='utf-8') as new_file:
        file_content = "{header} {language_codes}{footer}".format(
            header=languages_file_header,
            language_codes=pformat(language_codes, width=120, indent=4)[1:-1],
            footer=languages_file_footer,
        )
        new_file.write(file_content)
        new_file.close()