code: def test_save_all(tmp_path):
      # Single frame image
      helper_save_as_pdf(tmp_path, "RGB", save_all=True)
  
      # Multiframe image
      with Image.open("Tests/images/dispose_bgnd.gif") as im:
          outfile = str(tmp_path / "temp.pdf")
          im.save(outfile, save_all=True)
  
          assert os.path.isfile(outfile)
          assert os.path.getsize(outfile) > 0
  
          # Append images
          ims = [hopper()]
          im.copy().save(outfile, save_all=True, append_images=ims)
  
          assert os.path.isfile(outfile)
          assert os.path.getsize(outfile) > 0
  
          # Test appending using a generator
          def im_generator(ims):
              yield from ims
  
          im.save(
              outfile, save_all=True, append_images=im_generator(ims)
          )
  
      assert os.path.isfile(outfile)
      assert os.path.getsize(outfile) > 0
  
      # Append JPEG images
      with Image.open("Tests/images/flower.jpg") as jpeg:
          jpeg.save(outfile, save_all=True, append_images=[jpeg.copy()])
  
      assert os.path.isfile(outfile)
      assert os.path.getsize(outfile) > 0
  
imports: from __future__ import annotations
  import io
  import os
  import os.path
  import tempfile
  import time
  import pytest
  from PIL import Image, PdfParser, features
  from .helper import hopper, mark_if_feature_version, skip_unless_feature
label_desc: Use image node_id 9 for calling a global function with example usage: test_save_all(tmp_path) without return types