code: def test_invalid_resource(tmp_path):
      img = np.zeros((100, 100, 3))
  
      with pytest.raises(IOError):
          iio.imwrite(tmp_path / "foo.abc", img, plugin="pyav")
  
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 19 for calling a global function with example usage: test_invalid_resource(tmp_path) without return types