nodes: 0, module; 1, function_definition; 2, function_name:convtable2dict; 3, parameters; 4, block; 5, identifier:convtable; 6, identifier:locale; 7, default_parameter; 8, expression_statement; 9, expression_statement; 10, for_statement; 11, return_statement; 12, identifier:update; 13, None; 14, comment:"""
      Convert a list of conversion dict to a dict for a certain locale.
  
      >>> sorted(convtable2dict([{'zh-hk': '列斯', 'zh-hans': '利兹', 'zh': '利兹', 'zh-tw': '里茲'}, {':uni': '巨集', 'zh-cn': '宏'}], 'zh-cn').items())
      [('列斯', '利兹'), ('利兹', '利兹'), ('巨集', '宏'), ('里茲', '利兹')]
      """; 15, assignment; 16, identifier:r; 17, identifier:convtable; 18, block; 19, identifier:rdict; 20, identifier:rdict; 21, conditional_expression:update.copy() if update else {}; 22, if_statement; 23, call; 24, identifier:update; 25, dictionary; 26, comparison_operator:':uni' in r; 27, block; 28, elif_clause; 29, else_clause; 30, attribute; 31, argument_list; 32, string; 33, identifier:r; 34, if_statement; 35, comparison_operator:locale[:-1] == 'zh-han'; 36, block; 37, block; 38, identifier:update; 39, identifier:copy; 40, string_content::uni; 41, comparison_operator:locale in r; 42, block; 43, subscript; 44, string; 45, if_statement; 46, expression_statement; 47, for_statement; 48, identifier:locale; 49, identifier:r; 50, expression_statement; 51, identifier:locale; 52, slice; 53, string_content:zh-han; 54, comparison_operator:locale in r; 55, block; 56, assignment; 57, identifier:word; 58, call; 59, block; 60, assignment; 61, unary_operator; 62, identifier:locale; 63, identifier:r; 64, for_statement; 65, identifier:v; 66, call; 67, attribute; 68, argument_list; 69, expression_statement; 70, subscript; 71, subscript; 72, integer:1; 73, identifier:word; 74, call; 75, block; 76, identifier:fallback; 77, argument_list; 78, identifier:r; 79, identifier:values; 80, assignment; 81, identifier:rdict; 82, subscript; 83, identifier:r; 84, identifier:locale; 85, attribute; 86, argument_list; 87, expression_statement; 88, identifier:locale; 89, identifier:r; 90, subscript; 91, identifier:v; 92, identifier:r; 93, string; 94, identifier:r; 95, identifier:values; 96, assignment; 97, identifier:rdict; 98, identifier:word; 99, string_content::uni; 100, subscript; 101, subscript; 102, identifier:rdict; 103, identifier:word; 104, identifier:r; 105, identifier:locale
code: def convtable2dict(convtable, locale, update=None):
      """
      Convert a list of conversion dict to a dict for a certain locale.
  
      >>> sorted(convtable2dict([{'zh-hk': '列斯', 'zh-hans': '利兹', 'zh': '利兹', 'zh-tw': '里茲'}, {':uni': '巨集', 'zh-cn': '宏'}], 'zh-cn').items())
      [('列斯', '利兹'), ('利兹', '利兹'), ('巨集', '宏'), ('里茲', '利兹')]
      """
      rdict = update.copy() if update else {}
      for r in convtable:
          if ':uni' in r:
              if locale in r:
                  rdict[r[':uni']] = r[locale]
          elif locale[:-1] == 'zh-han':
              if locale in r:
                  for word in r.values():
                      rdict[word] = r[locale]
          else:
              v = fallback(locale, r)
              for word in r.values():
                  rdict[word] = v
      return rdict