code: def assert_save_filename_check(self, tmp_path, src_img, save_func):
      for filename in test_filenames:
          dest_file = str(tmp_path / filename)
          save_func(src_img, 0, dest_file)
          # If file can't be opened, shell injection probably occurred
          with Image.open(dest_file) as im:
              im.load()
  
file_path: pillow/Tests/test_shell_injection.py
imports: from __future__ import annotations
  import shutil
  import pytest
  from PIL import GifImagePlugin, Image, JpegImagePlugin
  from .helper import cjpeg_available, djpeg_available, is_win32, netpbm_available
label_desc: Use image node_id 1 for calling the TestShellInjection obj's underlying member method code with example usage: obj.assert_save_filename_check(tmp_path, src_img, save_func) without return types