code: def test_palette_save_all_P(tmp_path):
      frames = []
      colors = ((255, 0, 0), (0, 255, 0))
      for color in colors:
          frame = Image.new("P", (100, 100))
          frame.putpalette(color)
          frames.append(frame)
  
      out = str(tmp_path / "temp.gif")
      frames[0].save(
          out,
          save_all=True,
          palette=[255, 0, 0, 0, 255, 0],
          append_images=frames[1:],
      )
  
      with Image.open(out) as im:
          # Assert that the frames are correct, and each frame has the same palette
          assert_image_equal(
              im.convert("RGB"), frames[0].convert("RGB")
          )
          assert im.palette.palette == im.global_palette.palette
  
          im.seek(1)
          assert_image_equal(
              im.convert("RGB"), frames[1].convert("RGB")
          )
          assert im.palette.palette == im.global_palette.palette
  
imports: from io import BytesIO
  import pytest
  from PIL import GifImagePlugin, Image, ImageDraw, ImagePalette, features
  from .helper import assert_image_equal, assert_image_equal_tofile, assert_image_similar, hopper, is_pypy, netpbm_available
label_desc: Use image node_id 54 for calling a global function with example usage: test_palette_save_all_P(tmp_path) without return types