code: def test_apng_dispose_op_previous_frame():
      # Test that the dispose settings being used are from the previous frame
      #
      # Image created with:
      # red = Image.new("RGBA", (128, 64), (255, 0, 0, 255))
      # green = red.copy()
      # green.paste(Image.new("RGBA", (64, 32), (0, 255, 0, 255)))
      # blue = red.copy()
      # blue.paste(Image.new("RGBA", (64, 32), (0, 255, 0, 255)), (64, 32))
      #
      # red.save(
      #     "Tests/images/apng/dispose_op_previous_frame.png",
      #     save_all=True,
      #     append_images=[green, blue],
      #     disposal=[
      #         PngImagePlugin.APNG_DISPOSE_OP_NONE,
      #         PngImagePlugin.APNG_DISPOSE_OP_PREVIOUS,
      #         PngImagePlugin.APNG_DISPOSE_OP_PREVIOUS
      #     ],
      # )
      with Image.open(
          "Tests/images/apng/dispose_op_previous_frame.png"
      ) as im:
          im.seek(im.n_frames - 1)
          assert im.getpixel((0, 0)) == (255, 0, 0, 255)
  
imports: import pytest
  from PIL import Image, ImageSequence, PngImagePlugin
label_desc: Use image node_id 5 for calling a global function with example usage: test_apng_dispose_op_previous_frame() without return types