code: def get_colors(image):
      
      colors = Counter(pixel for row in image for pixel in row)
      if len(colors) > 256:
          msg = (
              "The maximum number of distinct colors in a GIF is 256 but "
              "this image has {} colors and can't be encoded properly."
          )
          raise RuntimeError(msg.format(len(colors)))
      return colors
docs: Return a Counter containing each color and how often it appears.