code: def test_save(mode, test_file, tmp_path):
      out = str(tmp_path / "temp.dds")
      with Image.open(test_file) as im:
          assert im.mode == mode
          im.save(out)
  
          with Image.open(out) as reloaded:
              assert_image_equal(im, reloaded)
  
imports: from io import BytesIO
  import pytest
  from PIL import DdsImagePlugin, Image
  from .helper import assert_image_equal, assert_image_equal_tofile, hopper
label_desc: Use image node_id 18 for calling a global function with example usage: test_save(mode, test_file, tmp_path) without return types