nodes: 0, module; 1, function_definition; 2, function_name:_get_global_color_table; 3, parameters; 4, block; 5, identifier:colors; 6, expression_statement; 7, expression_statement; 8, expression_statement; 9, expression_statement; 10, expression_statement; 11, return_statement; 12, comment:"""Return a color table sorted in descending order of count.
      """; 13, assignment; 14, assignment; 15, assignment; 16, assignment; 17, binary_operator:global_color_table + zeros; 18, identifier:global_color_table; 19, call; 20, identifier:full_table_size; 21, binary_operator:2**(1+int(get_color_table_size(len(colors)), 2)); 22, identifier:repeats; 23, binary_operator:3 * (full_table_size - len(colors)); 24, identifier:zeros; 25, call; 26, identifier:global_color_table; 27, identifier:zeros; 28, attribute; 29, generator_expression; 30, integer:2; 31, parenthesized_expression; 32, integer:3; 33, parenthesized_expression; 34, attribute; 35, argument_list; 36, string; 37, identifier:join; 38, subscript; 39, for_in_clause; 40, binary_operator:1+int(get_color_table_size(len(colors)), 2); 41, binary_operator:full_table_size - len(colors); 42, identifier:struct; 43, identifier:pack; 44, call; 45, identifier:c; 46, integer:0; 47, identifier:c; 48, call; 49, integer:1; 50, call; 51, identifier:full_table_size; 52, call; 53, attribute; 54, argument_list; 55, attribute; 56, argument_list; 57, identifier:int; 58, argument_list; 59, identifier:len; 60, argument_list; 61, string; 62, identifier:format; 63, identifier:repeats; 64, identifier:colors; 65, identifier:most_common; 66, call; 67, integer:2; 68, identifier:colors; 69, string_content:<{}x; 70, identifier:get_color_table_size; 71, argument_list; 72, call; 73, identifier:len; 74, argument_list; 75, identifier:colors
code: def _get_global_color_table(colors):
      """Return a color table sorted in descending order of count.
      """
      global_color_table = b''.join(c[0] for c in colors.most_common())
      full_table_size = 2**(1+int(get_color_table_size(len(colors)), 2))
      repeats = 3 * (full_table_size - len(colors))
      zeros = struct.pack('<{}x'.format(repeats))
      return global_color_table + zeros