code: def test_apng_basic():
      with Image.open("Tests/images/apng/single_frame.png") as im:
          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:
          assert im.is_animated
          assert im.n_frames == 2
          assert im.get_format_mimetype() == "image/apng"
          assert im.info.get("default_image")
          assert im.getpixel((0, 0)) == (255, 0, 0, 255)
          assert im.getpixel((64, 32)) == (255, 0, 0, 255)
          im.seek(1)
          assert im.getpixel((0, 0)) == (0, 255, 0, 255)
          assert im.getpixel((64, 32)) == (0, 255, 0, 255)
  
          # test out of bounds seek
          with pytest.raises(EOFError):
              im.seek(2)
  
          # test rewind support
          im.seek(0)
          assert im.getpixel((0, 0)) == (255, 0, 0, 255)
          assert im.getpixel((64, 32)) == (255, 0, 0, 255)
          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 1 for calling a global function with example usage: test_apng_basic() without return types