code: def test_seek_vs_iter(test_images):
      img_path = test_images / "cockatoo.mp4"
      n_frames = iio.improps(img_path, plugin="pyav").shape[0]
      test_indices = [30, 31, 32, 76, 158, n_frames - 1]
  
      with iio.imopen(img_path, "r", plugin="pyav") as file:
          for idx, expected in enumerate(
              iio.imiter(img_path, plugin="pyav", thread_type="FRAME")
          ):
              if idx not in test_indices:
                  continue
  
              actual = file.read(index=idx, thread_type="FRAME")
              assert np.allclose(actual, expected)
  
              actual = iio.imread(img_path, plugin="pyav", index=idx)
              assert np.allclose(actual, expected)
  
imports: import io
  import warnings
  from contextlib import ExitStack
  from pathlib import Path
  import numpy
  import pytest
  from conftest import IS_PYPY
  import imageio.v3
  from av.video.format import names
  from imageio.plugins.pyav import _format_to_dtype
label_desc: Use image node_id 23 for calling a global function with example usage: test_seek_vs_iter(test_images) without return types