code: def test_apng_chunk_errors():
      with Image.open("Tests/images/apng/chunk_no_actl.png") as im:
          assert not im.is_animated
  
      with pytest.warns(UserWarning):
          with Image.open(
              "Tests/images/apng/chunk_multi_actl.png"
          ) as im:
              im.load()
          assert not im.is_animated
  
      with Image.open(
          "Tests/images/apng/chunk_actl_after_idat.png"
      ) as im:
          assert not im.is_animated
  
      with Image.open("Tests/images/apng/chunk_no_fctl.png") as im:
          with pytest.raises(SyntaxError):
              im.seek(im.n_frames - 1)
  
      with Image.open("Tests/images/apng/chunk_repeat_fctl.png") as im:
          with pytest.raises(SyntaxError):
              im.seek(im.n_frames - 1)
  
      with Image.open("Tests/images/apng/chunk_no_fdat.png") as im:
          with pytest.raises(SyntaxError):
              im.seek(im.n_frames - 1)
  
imports: from __future__ import annotations
  import pytest
  from PIL import Image, ImageSequence, PngImagePlugin
label_desc: Use image node_id 13 for calling a global function with example usage: test_apng_chunk_errors() without return types