code: def test_seek():
      for test_file in test_files:
          with Image.open(test_file) as im:
              assert im.tell() == 0
              # prior to first image raises an error, both blatant and borderline
              with pytest.raises(EOFError):
                  im.seek(-1)
              with pytest.raises(EOFError):
                  im.seek(-523)
              # after the final image raises an error,
              # both blatant and borderline
              with pytest.raises(EOFError):
                  im.seek(2)
              with pytest.raises(EOFError):
                  im.seek(523)
              # bad calls shouldn't change the frame
              assert im.tell() == 0
              # this one will work
              im.seek(1)
              assert im.tell() == 1
              # and this one, too
              im.seek(0)
              assert im.tell() == 0
  
imports: from io import BytesIO
  import pytest
  from PIL import Image
  from .helper import assert_image_similar, is_pypy, skip_unless_feature
label_desc: Use image node_id 15 for calling a global function with example usage: test_seek() without return types