code: def test_multi_io_erros(tmpdir):
      fdir = tmpdir.mkdir("tmpdir")
      multi = MultiBlock()
      # Check saving with bad extension
      bad_ext_name = str(fdir.join("tmp.npy"))
      with pytest.raises(ValueError):
          multi.save(bad_ext_name)
      arr = np.random.default_rng().random((10, 10))
      np.save(bad_ext_name, arr)
      # Load non existing file
      with pytest.raises(FileNotFoundError):
          _ = MultiBlock("foo.vtm")
      # Load bad extension
      with pytest.raises(IOError):
          _ = MultiBlock(bad_ext_name)
  
imports: import pathlib
  import platform
  import weakref
  import numpy
  import pytest
  import vtk
  import pyvista
  from pyvista import ImageData, MultiBlock, PolyData, RectilinearGrid, StructuredGrid, examples
label_desc: Use image node_id 21 for calling a global function with example usage: test_multi_io_erros(tmpdir) without return types