code: def categorical(options, scale=None):
      # Can specify a scale to match the api or to accept unknown unit types.
      palette_size = scale or max(options) + 1
      palette = shuffled_hue(palette_size)
      assert len(options) <= len(distinct_colors)
      for i, v in enumerate(options):
          palette[v] = distinct_colors[i]
      return palette
  
imports: import collections
  import math
  import random
  import numpy
  from pysc2.lib import static_data
label_desc: Use image node_id 9 for calling a global function with example usage: categorical(options, scale) and returns: palette