code: def parse_extlang(subtags):
      
      index = 0
      parsed = []
      while index < len(subtags) and len(subtags[index]) == 3 and index < 3:
          parsed.append(('extlang', subtags[index]))
          index += 1
      return parsed + parse_subtags(subtags[index:], SCRIPT)
docs: Parse an 'extended language' tag, which consists of 1 to 3 three-letter
      language codes.
  
      Extended languages are used for distinguishing dialects/sublanguages
      (depending on your view) of macrolanguages such as Arabic, Bahasa Malay,
      and Chinese.
  
      It's supposed to also be acceptable to just use the sublanguage as the
      primary language code, and your code should know what's a macrolanguage of
      what. For example, 'zh-yue' and 'yue' are the same language (Cantonese),
      and differ only in whether they explicitly spell out that Cantonese is a
      kind of Chinese.