code: def get_hex_colors(n_classes, cmap_name="RdYlBu"):
      """
      Will generate a list of lists that contain n discrete hex colors
      from a given matplotlib colormap based on the number of classes in
      a given classifier model as determined in trees.py. Defaults to the
      "RdYlBu" colormap.
  
      For backward compatibility with the color_blind_friendly_colors, the first 10 lists will be populated with values
      from color_blind_friendly_colors list.
  
      Args:
          n_classes (int): the number of classes in a classifier model as determined
          by trees.py
          cmap_name (str, optional): any valid matplotlib colormap. Defaults to "RdYlBu".
  
      Returns:
          list: a list of lists where each inner list item contains n discrete hex colors.
      """
  
      hex_colors = color_blind_friendly_colors.copy()
      if n_classes:
          for i in range(
              len(color_blind_friendly_colors), n_classes + 1
          ):
              cmap = matplotlib.cm.get_cmap(cmap_name, i)
              hex_colors.append(
                  [
                      matplotlib.colors.to_hex(rgb, keep_alpha=True)
                      for rgb in cmap(np.arange(0, cmap.N))
                  ]
              )
  
      return hex_colors
  
label_desc: Use image node_id 1 for calling a global function with example usage: get_hex_colors(n_classes, cmap_name) and returns: hex_colors