code: def sort_by_hue(self, ascending=True):
      new_palette = ColorPalette.from_hex_list(
          colors=self.colors[:],
          palette_type=self.palette_type,
          name=self.name,
      )
      new_palette.colors.sort(
          key=lambda x: x.get_hue(), reverse=ascending
      )
      return new_palette
  
imports: from collections import OrderedDict
  from bokeh import palettes
  from IPython.core.display import HTML
  import yaml
  from chartify._core.options import options
  from chartify._core import colour
label_desc: Use image node_id 5 for calling the ColorPalette obj's underlying member method code with example usage: obj.sort_by_hue(ascending) and returns: new_palette