code: def test_identical_frames(tmp_path):
      duration_list = [1000, 1500, 2000, 4000]
  
      out = str(tmp_path / "temp.gif")
      im_list = [
          Image.new("L", (100, 100), "#000"),
          Image.new("L", (100, 100), "#000"),
          Image.new("L", (100, 100), "#000"),
          Image.new("L", (100, 100), "#111"),
      ]
  
      # Duration as list
      im_list[0].save(
          out,
          save_all=True,
          append_images=im_list[1:],
          duration=duration_list,
      )
      with Image.open(out) as reread:
          # Assert that the first three frames were combined
          assert reread.n_frames == 2
  
          # Assert that the new duration is the total of the identical frames
          assert reread.info["duration"] == 4500
  
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 40 for calling a global function with example usage: test_identical_frames(tmp_path) without return types