code: def test_mp4_read(test_images: Path):
      with av.open(str(test_images / "cockatoo.mp4"), "r") as container:
          for idx, frame in enumerate(container.decode(video=0)):
              if idx == 4:
                  break
  
      # ImageIO serves the data channel-first
      expected = frame.to_ndarray(format="rgb24")
  
      result = iio.imread(
          test_images / "cockatoo.mp4",
          index=4,
          plugin="pyav",
          format="rgb24",
      )
      assert np.allclose(result, expected)
  
      result = iio.imread(
          test_images / "cockatoo.mp4",
          index=4,
          plugin="pyav",
          constant_framerate=False,
          format="rgb24",
      )
      assert np.allclose(result, 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 1 for calling a global function with example usage: test_mp4_read(test_images) without return types