code: def test_duration(tmp_path):
      duration = 1000
  
      out = str(tmp_path / "temp.gif")
      im = Image.new("L", (100, 100), "#000")
  
      # Check that the argument has priority over the info settings
      im.info["duration"] = 100
      im.save(out, duration=duration)
  
      with Image.open(out) as reread:
          assert reread.info["duration"] == duration
  
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 38 for calling a global function with example usage: test_duration(tmp_path) without return types