code: def test_palette_rawmode():
      im = Image.new("P", (1, 1))
      im.putpalette((1, 2, 3))
  
      for rawmode in ("RGB", None):
          rgb = im.getpalette(rawmode)
          assert rgb == [1, 2, 3]
  
      # Convert the RGB palette to RGBA
      rgba = im.getpalette("RGBA")
      assert rgba == [1, 2, 3, 255]
  
      im.putpalette((1, 2, 3, 4), "RGBA")
  
      # Convert the RGBA palette to RGB
      rgb = im.getpalette("RGB")
      assert rgb == [1, 2, 3]
  
      for rawmode in ("RGBA", None):
          rgba = im.getpalette(rawmode)
          assert rgba == [1, 2, 3, 4]
  
imports: from __future__ import annotations
  from PIL import Image
  from .helper import hopper
label_desc: Use image node_id 2 for calling a global function with example usage: test_palette_rawmode() without return types