code: def test_roundtrip(tmp_path):
      def roundtrip(mode):
          out = str(tmp_path / "temp.im")
          im = hopper(mode)
          im.save(out)
          assert_image_equal_tofile(im, out)
  
      for mode in ["RGB", "P", "PA"]:
          roundtrip(mode)
  
file_path: pillow-simd/Tests/test_file_im.py
imports: import filecmp
  import pytest
  from PIL import Image, ImImagePlugin
  from .helper import assert_image_equal_tofile, hopper, is_pypy
label_desc: Use image node_id 9 for calling a global function with example usage: test_roundtrip(tmp_path) without return types