code: def test_number_of_loops(tmp_path):
      number_of_loops = 2
  
      out = str(tmp_path / "temp.gif")
      im = Image.new("L", (100, 100), "#000")
      im.save(out, loop=number_of_loops)
      with Image.open(out) as reread:
          assert reread.info["loop"] == number_of_loops
  
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 42 for calling a global function with example usage: test_number_of_loops(tmp_path) without return types