code: def test_all_frames():
      # Test a single image
      with Image.open("Tests/images/iss634.gif") as im:
          ims = ImageSequence.all_frames(im)
  
          assert len(ims) == 42
          for i, im_frame in enumerate(ims):
              assert im_frame is not im
  
              im.seek(i)
              assert_image_equal(im, im_frame)
  
          # Test a series of images
          ims = ImageSequence.all_frames([im, hopper(), im])
          assert len(ims) == 85
  
          # Test an operation
          ims = ImageSequence.all_frames(
              im, lambda im_frame: im_frame.rotate(90)
          )
          for i, im_frame in enumerate(ims):
              im.seek(i)
              assert_image_equal(im.rotate(90), im_frame)
  
file_path: pillow/Tests/test_imagesequence.py
imports: from __future__ import annotations
  import pytest
  from PIL import Image, ImageSequence, TiffImagePlugin
  from .helper import assert_image_equal, hopper, skip_unless_feature
label_desc: Use image node_id 9 for calling a global function with example usage: test_all_frames() without return types