code: def _color_brew(n: int) -> list[tuple[int, int, int]]:
      """Generate n colors with equally spaced hues.
  
      Parameters
      ----------
      n
          The number of required colors.
  
      Returns
      -------
          List of n tuples of form (R, G, B) being the components of each color.
      References
      ----------
      https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/tree/_export.py
      """
      colors = []
  
      # Initialize saturation & value; calculate chroma & value shift
      s, v = 0.75, 0.9
      c = s * v
      m = v - c
  
      for h in [i for i in range(25, 385, int(360 / n))]:
          # Calculate some intermediate values
          h_bar = h / 60.0
          x = c * (1 - abs((h_bar % 2) - 1))
  
          # Initialize RGB with same hue & chroma as our color
          rgb = [
              (c, x, 0),
              (x, c, 0),
              (0, c, x),
              (0, x, c),
              (x, 0, c),
              (c, 0, x),
              (c, x, 0),
          ]
          r, g, b = rgb[int(h_bar)]
  
          # Shift the initial RGB values to match value and store
          colors.append(
              (
                  (int(255 * (r + m))),
                  (int(255 * (g + m))),
                  (int(255 * (b + m))),
              )
          )
  
      return colors
  
imports: from __future__ import annotations
  import collections
  import functools
  import io
  import math
  from abc import ABC, abstractmethod
  from river import base
  from river.utils.norm import normalize_values_in_dict
  from .nodes.branch import DTBranch, NominalBinaryBranch, NominalMultiwayBranch, NumericBinaryBranch, NumericMultiwayBranch
  from .nodes.leaf import HTLeaf
  from .utils import calculate_object_size
label_desc: Use image node_id 1 for calling a global function with example usage: _color_brew(n) and returns: colors