code: def test_apng_save(tmp_path):
      with Image.open("Tests/images/apng/single_frame.png") as im:
          test_file = str(tmp_path / "temp.png")
          im.save(test_file, save_all=True)
  
      with Image.open(test_file) as im:
          im.load()
          assert not im.is_animated
          assert im.n_frames == 1
          assert im.get_format_mimetype() == "image/apng"
          assert im.info.get("default_image") is None
          assert im.getpixel((0, 0)) == (0, 255, 0, 255)
          assert im.getpixel((64, 32)) == (0, 255, 0, 255)
  
      with Image.open(
          "Tests/images/apng/single_frame_default.png"
      ) as im:
          frames = []
          for frame_im in ImageSequence.Iterator(im):
              frames.append(frame_im.copy())
          frames[0].save(
              test_file,
              save_all=True,
              default_image=True,
              append_images=frames[1:],
          )
  
      with Image.open(test_file) as im:
          im.load()
          assert im.is_animated
          assert im.n_frames == 2
          assert im.get_format_mimetype() == "image/apng"
          assert im.info.get("default_image")
          im.seek(1)
          assert im.getpixel((0, 0)) == (0, 255, 0, 255)
          assert im.getpixel((64, 32)) == (0, 255, 0, 255)
  
imports: import pytest
  from PIL import Image, ImageSequence, PngImagePlugin
label_desc: Use image node_id 15 for calling a global function with example usage: test_apng_save(tmp_path) without return types