code: def _get_color_table_size(palette_bytes):
      # calculate the palette size for the header
      import math
  
      if not palette_bytes:
          return 0
      elif len(palette_bytes) < 9:
          return 1
      else:
          return (
              int(math.ceil(math.log(len(palette_bytes) // 3, 2))) - 1
          )
  
imports: import itertools
  from .None import Image, ImageChops, ImageFile, ImagePalette, ImageSequence
  from ._binary import i8, i16le, o8, o16le
label_desc: Use image node_id 12 for calling a global function with example usage: _get_color_table_size(palette_bytes) and returns: int, int, unknown