code: def test_file_format():
      from meshio._exceptions import ReadError, WriteError
  
      with pytest.raises(ReadError):
          _ = pv.read_meshio(examples.hexbeamfile, file_format="bar")
  
      with pytest.raises((KeyError, WriteError)):
          pv.save_meshio("foo.bar", beam, file_format="bar")
  
      with pytest.raises((KeyError, WriteError)):
          pv.save_meshio("foo.npy", beam, file_format="npy")
  
file_path: pyvista/tests/test_meshio.py
imports: import pathlib
  import meshio
  import numpy
  import pytest
  import pyvista
  from pyvista import examples
label_desc: Use image node_id 3 for calling a global function with example usage: test_file_format() without return types