code: def setup(self, canvas_size, how, category_count):
      rng = np.random.default_rng(349120)
      data = rng.random(
          (canvas_size, canvas_size, category_count), dtype=np.float32
      )
      data[data < 0.1] = np.nan  # Want some nans in data.
      x = np.arange(canvas_size, dtype=np.float32)
      y = np.arange(canvas_size, dtype=np.float32)
      cat = [f"cat{i}" for i in range(category_count)]
      self.agg = xr.DataArray(
          data=data,
          dims=["y", "x", "cat"],
          coords=dict(x=x, y=y, cat=cat),
      )
  
      random_colors = rng.choice(colorcet.rainbow, category_count)
      self.color_key = {k: v for k, v in zip(cat, random_colors)}
  
file_path: datashader/benchmarks/benchmarks/shade.py
imports: import colorcet
  import datashader.transfer_functions
  import numpy
  import xarray
label_desc: Use image node_id 1 for calling the ShadeCategorical obj's underlying member method code with example usage: obj.setup(canvas_size, how, category_count) without return types