code: def test_overload_fps(test_images):
      # Native
      r = imageio.get_reader(test_images / "cockatoo.mp4")
      assert r.count_frames() == 280  # native
      assert int(r._meta["fps"] * r._meta["duration"] + 0.5) == 280
      ims = [1 for _ in r]
      assert len(ims) in (280, 281)
  
      # Less
      r = imageio.get_reader(test_images / "cockatoo.mp4", fps=8)
      ims = [1 for _ in r]
      assert len(ims) == 114
  
      # More
      r = imageio.get_reader(test_images / "cockatoo.mp4", fps=24)
      ims = [1 for _ in r]
      assert len(ims) in (336, 337)
  
      # Do we calculate nframes correctly? To be fair, the reader wont try to
      # read beyond what it thinks how many frames it has. But this at least
      # makes sure that this works.
      for fps in (8.0, 8.02, 8.04, 8.06, 8.08):
          r = imageio.get_reader(test_images / "cockatoo.mp4", fps=fps)
          n = int(fps * r._meta["duration"] + 0.5)
          i = 0
          try:
              while True:
                  r.get_next_data()
                  i += 1
          except (StopIteration, IndexError):
              pass
          assert n - 2 <= i <= n + 2
  
imports: import pytest
  import imageio
  import sys
label_desc: Use image node_id 3 for calling a global function with example usage: test_overload_fps(test_images) without return types