code: def test_tiff_save_all(self):
      mp = BytesIO()
      with Image.open("Tests/images/multipage.tiff") as im:
          im.save(mp, format="tiff", save_all=True)
  
      mp.seek(0, os.SEEK_SET)
      with Image.open(mp) as im:
          assert im.n_frames == 3
  
      # Test appending images
      mp = BytesIO()
      im = Image.new("RGB", (100, 100), "#f00")
      ims = [
          Image.new("RGB", (100, 100), color)
          for color in ["#0f0", "#00f"]
      ]
      im.copy().save(
          mp, format="TIFF", save_all=True, append_images=ims
      )
  
      mp.seek(0, os.SEEK_SET)
      with Image.open(mp) as reread:
          assert reread.n_frames == 3
  
      # Test appending using a generator
      def imGenerator(ims):
          yield from ims
  
      mp = BytesIO()
      im.save(
          mp,
          format="TIFF",
          save_all=True,
          append_images=imGenerator(ims),
      )
  
      mp.seek(0, os.SEEK_SET)
      with Image.open(mp) as reread:
          assert reread.n_frames == 3
  
imports: import os
  from io import BytesIO
  import pytest
  from PIL import Image, ImageFile, TiffImagePlugin
  from PIL.TiffImagePlugin import RESOLUTION_UNIT, X_RESOLUTION, Y_RESOLUTION
  from .helper import assert_image_equal, assert_image_equal_tofile, assert_image_similar, assert_image_similar_tofile, hopper, is_pypy, is_win32
label_desc: Use image node_id 53 for calling the TestFileTiff obj's underlying member method code with example usage: obj.test_tiff_save_all() without return types