code: def test_eoferror():
      with Image.open(TEST_IM) 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)
  
file_path: pillow-simd/Tests/test_file_im.py
imports: import filecmp
  import pytest
  from PIL import Image, ImImagePlugin
  from .helper import assert_image_equal_tofile, hopper, is_pypy
label_desc: Use image node_id 8 for calling a global function with example usage: test_eoferror() without return types