code: def test_identical_frames_to_single_frame(tmp_path):
      for duration in (
          [1000, 1500, 2000, 4000],
          (1000, 1500, 2000, 4000),
          8500,
      ):
          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"),
          ]
  
          im_list[0].save(
              out,
              save_all=True,
              append_images=im_list[1:],
              duration=duration,
          )
          with Image.open(out) as reread:
              # Assert that all frames were combined
              assert reread.n_frames == 1
  
              # Assert that the new duration is the total of the identical frames
              assert reread.info["duration"] == 8500
  
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 41 for calling a global function with example usage: test_identical_frames_to_single_frame(tmp_path) without return types