code: def test_seek_delimiter_endline():
      f = io.BytesIO(b"123\n456\n789")
  
      # if at zero, stay at zero
      seek_delimiter(f, b"\n", 5)
      assert f.tell() == 0
  
      # choose the first block
      for bs in [1, 5, 100]:
          f.seek(1)
          seek_delimiter(f, b"\n", blocksize=bs)
          assert f.tell() == 4
  
      # handle long delimiters well, even with short blocksizes
      f = io.BytesIO(b"123abc456abc789")
      for bs in [1, 2, 3, 4, 5, 6, 10]:
          f.seek(1)
          seek_delimiter(f, b"abc", blocksize=bs)
          assert f.tell() == 6
  
      # End at the end
      f = io.BytesIO(b"123\n456")
      f.seek(5)
      seek_delimiter(f, b"\n", 5)
      assert f.tell() == 7
  
file_path: dask/dask/bytes/tests/test_bytes_utils.py
imports: from __future__ import annotations
  import io
  import os
  import pathlib
  import pytest
  from fsspec.utils import infer_storage_options, read_block, seek_delimiter, stringify_path
label_desc: Use image node_id 2 for calling a global function with example usage: test_seek_delimiter_endline() without return types