code: def test_reader_more(test_images, tmp_path):
      fname1 = test_images / "cockatoo.mp4"
  
      fname3 = tmp_path / "cockatoo.stub.mp4"
  
      # Get meta data
      R = iio.read(fname1, "ffmpeg", loop=True)
      meta = R.get_meta_data()
      assert len(R) == 280
      assert isinstance(meta, dict)
      assert "fps" in meta
      R.close()
  
      # Test size argument
      im = iio.read(fname1, "ffmpeg", size=(50, 50)).get_data(0)
      assert im.shape == (50, 50, 3)
      im = iio.read(fname1, "ffmpeg", size="40x40").get_data(0)
      assert im.shape == (40, 40, 3)
      with pytest.raises(ValueError):
          iio.read(fname1, "ffmpeg", size=20)
      with pytest.raises(ValueError):
          iio.read(fname1, "ffmpeg", pixelformat=20)
  
      # Read all frames and test length
      R = iio.read(test_images / "realshort.mp4", "ffmpeg")
      count = 0
      while True:
          try:
              R.get_next_data()
          except IndexError:
              break
          else:
              count += 1
      assert count == R.count_frames()
      assert count in (35, 36)  # allow one frame off size that we know
      with pytest.raises(IndexError):
          R.get_data(-1)  # Test index error -1
  
      # Now read beyond (simulate broken file)
      with pytest.raises(StopIteration):
          R._read_frame()  # ffmpeg seems to have an extra frame
          R._read_frame()
  
      # Set the image index to 0 and go again
      R.set_image_index(0)
      count2 = 0
      while True:
          try:
              R.get_next_data()
          except IndexError:
              break
          else:
              count2 += 1
      assert count2 == count
      with pytest.raises(IndexError):
          R.get_data(-1)  # Test index error -1
  
      # Test loop
      R = iio.read(test_images / "realshort.mp4", "ffmpeg", loop=1)
      im1 = R.get_next_data()
      for i in range(1, len(R)):
          R.get_next_data()
      im2 = R.get_next_data()
      im3 = R.get_data(0)
      im4 = R.get_data(2)  # touch skipping frames
      assert (im1 == im2).all()
      assert (im1 == im3).all()
      assert not (im1 == im4).all()
      R.close()
  
      # Read invalid
      open(fname3, "wb")
      with pytest.raises(IOError):
          iio.read(fname3, "ffmpeg")
  
      # Read printing info
      iio.read(fname1, "ffmpeg", print_info=True)
  
imports: import gc
  import os
  import platform
  import sys
  import threading
  import time
  import warnings
  from io import BytesIO
  from pathlib import Path
  import imageio.plugins
  import imageio.v2
  import imageio.v3
  import numpy
  import pytest
  from imageio import core
  from imageio.core import IS_PYPY
  from conftest import deprecated_test
label_desc: Use image node_id 12 for calling a global function with example usage: test_reader_more(test_images, tmp_path) without return types