code: def test_seek(test_file):
      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 __future__ import annotations
  import warnings
  from io import BytesIO
  import pytest
  from PIL import Image
  from .helper import assert_image_equal, assert_image_similar, is_pypy, skip_unless_feature
label_desc: Use image node_id 17 for calling a global function with example usage: test_seek(test_file) without return types