code: def test_save_dispose(tmp_path):
      out = str(tmp_path / "temp.gif")
      im_list = [
          Image.new("L", (100, 100), "#000"),
          Image.new("L", (100, 100), "#111"),
          Image.new("L", (100, 100), "#222"),
      ]
      for method in range(0, 4):
          im_list[0].save(
              out,
              save_all=True,
              append_images=im_list[1:],
              disposal=method,
          )
          with Image.open(out) as img:
              for _ in range(2):
                  img.seek(img.tell() + 1)
                  assert img.disposal_method == method
  
      # Check per frame disposal
      im_list[0].save(
          out,
          save_all=True,
          append_images=im_list[1:],
          disposal=tuple(range(len(im_list))),
      )
  
      with Image.open(out) as img:
          for i in range(2):
              img.seek(img.tell() + 1)
              assert img.disposal_method == i + 1
  
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 32 for calling a global function with example usage: test_save_dispose(tmp_path) without return types