code: def test_exceptions(tmp_path):
      with pytest.raises(IOError):
          iio.imopen(
              io.BytesIO(), "w", plugin="pyav", legacy_mode=False
          )
  
      with pytest.raises(IOError):
          iio.imopen(b"nonsense", "r", plugin="pyav", legacy_mode=False)
  
      foo_file = tmp_path / "faulty.mp4"
      foo_file.write_bytes(b"nonsense")
      with pytest.raises(IOError):
          iio.imopen(foo_file, "r", plugin="pyav", legacy_mode=False)
  
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 17 for calling a global function with example usage: test_exceptions(tmp_path) without return types