code: def testAdvancedGradientPalette(self):
      agp = AdvancedGradientPalette(["red", "black", "blue"], n=9)
      self.assertTrue(agp.get(0) == (1.0, 0.0, 0.0, 1.0))
      self.assertTrue(agp.get(2) == (0.5, 0.0, 0.0, 1.0))
      self.assertTrue(agp.get(4) == (0.0, 0.0, 0.0, 1.0))
      self.assertTrue(agp.get(5) == (0.0, 0.0, 0.25, 1.0))
      self.assertTrue(agp.get(8) == (0.0, 0.0, 1.0, 1.0))
  
      agp = AdvancedGradientPalette(
          ["red", "black", "blue"], [0, 8, 2], 9
      )
      self.assertTrue(agp.get(0) == (1.0, 0.0, 0.0, 1.0))
      self.assertTrue(agp.get(1) == (0.5, 0.0, 0.5, 1.0))
      self.assertTrue(agp.get(5) == (0.0, 0.0, 0.5, 1.0))
  
imports: import unittest
  from igraph import hsv_to_rgb, hsva_to_rgba, hsl_to_rgb, hsla_to_rgba, rgb_to_hsl, rgba_to_hsla, rgba_to_hsva, rgb_to_hsv, GradientPalette, AdvancedGradientPalette
label_desc: Use image node_id 2 for calling the PaletteTests obj's underlying member method code with example usage: obj.testAdvancedGradientPalette() without return types