docs: def tag_match_score(desired: {str, Language}, supported: {str, Language}) -> int:
      """
      Return a number from 0 to 100 indicating the strength of match between the
      language the user desires, D, and a supported language, S. Higher numbers
      are better. A reasonable cutoff for not messing with your users is to
      only accept scores of 75 or more.
  
      A score of 100 means the languages are the same, possibly after normalizing
      and filling in likely values.
  
      >>> tag_match_score('en', 'en')
      100
      >>> tag_match_score('en', 'en-US')
      100
      >>> tag_match_score('zh-Hant', 'zh-TW')
      100
      >>> tag_match_score('ru-Cyrl', 'ru')
      100
      >>> # Serbo-Croatian is a politically contentious idea, but in practice
      >>> # it's considered equivalent to Serbian in Latin characters.
      >>> tag_match_score('sh', 'sr-Latn')
      100
  
      A score of 92 to 97 indicates a regional difference.
  
      >>> tag_match_score('zh-HK', 'zh-MO')   # Chinese is similar in Hong Kong and Macao
      97
      >>> tag_match_score('en-AU', 'en-GB')   # Australian English is similar to British English
      96
      >>> tag_match_score('en-IN', 'en-GB')   # Indian English is also similar to British English
      96
      >>> tag_match_score('es-PR', 'es-419')  # Peruvian Spanish is Latin American Spanish
      96
      >>> tag_match_score('en-US', 'en-GB')   # American and British English are somewhat different
      94
      >>> tag_match_score('es-MX', 'es-ES')   # Mexican Spanish is different from Spanish Spanish
      92
      >>> # Serbian has two scripts, and people might prefer one but understand both
      >>> tag_match_score('sr-Latn', 'sr-Cyrl')
      95
      >>> # European Portuguese is different from the most common form (Brazilian Portuguese)
      >>> tag_match_score('pt', 'pt-PT')
      92
  
      A score of 86 to 90 indicates that people who use the desired language
      are demographically likely to understand the supported language, even if
      the languages themselves are unrelated. There are many languages that have
      a one-way connection of this kind to English or French.
  
      >>> tag_match_score('ta', 'en')  # Tamil to English
      86
      >>> tag_match_score('mg', 'fr')  # Malagasy to French
      86
  
      Sometimes it's more straightforward than that: people who use the desired
      language are demographically likely to understand the supported language
      because it's demographically relevant and highly related.
  
      >>> tag_match_score('af', 'nl')  # Afrikaans to Dutch
      86
      >>> tag_match_score('ms', 'id')  # Malay to Indonesian
      86
      >>> tag_match_score('nn', 'nb')  # Nynorsk to Norwegian Bokmål
      90
      >>> tag_match_score('nb', 'da')  # Norwegian Bokmål to Danish
      88
  
      A score of 80 to 85 indicates a particularly contentious difference in
      script, where people who understand one script can learn the other but
      probably won't be happy with it. This specifically applies to Chinese.
  
      >>> tag_match_score('zh-Hans', 'zh-Hant')
      85
      >>> tag_match_score('zh-CN', 'zh-HK')
      85
      >>> tag_match_score('zh-CN', 'zh-TW')
      85
      >>> tag_match_score('zh-Hant', 'zh-Hans')
      81
      >>> tag_match_score('zh-TW', 'zh-CN')
      81
  
      When the supported script is a different one than desired, this is usually
      a major difference with score of 60 or less.
  
      >>> tag_match_score('ja', 'ja-Latn-US-hepburn')
      56
  
      >>> # You can read the Shavian script, right?
      >>> tag_match_score('en', 'en-Shaw')
      56
  
      When there is no indication the supported language will be understood, the
      score will be 20 or less, to a minimum of 0.
  
      >>> tag_match_score('es', 'fr')   # Spanish and French are different.
      16
      >>> tag_match_score('en', 'ta')   # English speakers generally do not know Tamil.
      0
  
      CLDR doesn't take into account which languages are considered part of a
      common 'macrolanguage'. We have this data, so we can use it in matching.
      If two languages have no other rule that would allow them to match, but
      share a macrolanguage, they'll get a match score of 20 less than what
      they would get if the language matched.
  
      >>> tag_match_score('arz', 'ar')   # Egyptian Arabic to Standard Arabic
      80
      >>> tag_match_score('arz', 'ary')  # Egyptian Arabic to Moroccan Arabic
      76
  
      Here's an example that has script, region, and language differences, but
      a macrolanguage in common.
  
      Written Chinese is usually presumed to be Mandarin Chinese, but colloquial
      Cantonese can be written as well. When it is, it probably has region,
      script, and language differences from the usual mainland Chinese. But it is
      still part of the 'Chinese' macrolanguage, so there is more similarity
      than, say, comparing Mandarin to Hindi.
  
      >>> tag_match_score('yue', 'zh')
      36
  
      Comparing Swiss German ('gsw') to standardized German ('de') shows how
      these scores can be asymmetrical. Swiss German speakers will understand
      German, so the score in that direction is 92. Most German speakers find
      Swiss German unintelligible, and CLDR in fact assigns this a score of 16.
  
      This seems a little bit extreme, but the asymmetry is certainly there. And
      if your text is tagged as 'gsw', it must be that way for a reason.
  
      >>> tag_match_score('gsw', 'de')
      92
      >>> tag_match_score('de', 'gsw')
      16
      """
      desired_ld = Language.get(desired)
      supported_ld = Language.get(supported)
      return desired_ld.match_score(supported_ld)