code: def _get_global_color_table(colors):
      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