code: def test_eoferror():
      with Image.open(TEST_GIF) as im:
          n_frames = im.n_frames
  
          # Test seeking past the last frame
          with pytest.raises(EOFError):
              im.seek(n_frames)
          assert im.tell() < n_frames
  
          # Test that seeking to the last frame does not raise an error
          im.seek(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 22 for calling a global function with example usage: test_eoferror() without return types