code: def _generate_signature_colors(self, quantity=8):
      signature_colors = list()
      height, width, pixels, animation_states = self.image_data.shape
  
      for i in range(animation_states):
          values, counts = np.unique(
              self.image_data[..., i].reshape(width * height, pixels),
              axis=0,
              return_counts=True,
          )
  
          if len(values[0]) == 3:
              maximum_indices = np.argsort(counts)[::-1][:quantity]
          elif len(values[0]) == 4:
              maximum_indices = list()
  
              for index in np.argsort(counts)[::-1]:
                  value = values[index]
  
                  if value[3] > 0:
                      maximum_indices.append(index)
  
                      if len(maximum_indices) == quantity:
                          break
  
          colors = [
              tuple(map(int, values[index][:3]))
              for index in maximum_indices
          ]
          signature_colors.append(set(colors))
  
      return signature_colors
  
file_path: SerpentAI/serpent/sprite.py
imports: import numpy
  import random
  import uuid
label_desc: Use image node_id 5 for calling the Sprite obj's underlying member method code with example usage: obj._generate_signature_colors(quantity) and returns: signature_colors