code: def test_n_frames():
      for path, n_frames in [
          [TEST_GIF, 1],
          ["Tests/images/iss634.gif", 42],
      ]:
          # Test is_animated before n_frames
          with Image.open(path) as im:
              assert im.is_animated == (n_frames != 1)
  
          # Test is_animated after n_frames
          with Image.open(path) as im:
              assert im.n_frames == n_frames
              assert im.is_animated == (n_frames != 1)
  
imports: from io import BytesIO
  import pytest
  from PIL import GifImagePlugin, Image, ImageDraw, ImagePalette, features
  from .helper import assert_image_equal, assert_image_equal_tofile, assert_image_similar, hopper, is_pypy, netpbm_available
label_desc: Use image node_id 21 for calling a global function with example usage: test_n_frames() without return types