code: def test_eoferror():
      with Image.open(test_file) as im:
          # PSD seek index starts at 1 rather than 0
          n_frames = im.n_frames + 1
  
          # 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_psd.py
imports: import pytest
  from PIL import Image, PsdImagePlugin
  from .helper import assert_image_similar, hopper, is_pypy
label_desc: Use image node_id 7 for calling a global function with example usage: test_eoferror() without return types