code: def test_meshio(mesh_in, tmpdir):
      if isinstance(mesh_in, meshio.Mesh):
          mesh_in = pv.from_meshio(mesh_in)
  
      # Save and read reference mesh using meshio
      filename = tmpdir.mkdir("tmpdir").join("test_mesh.vtk")
      pv.save_meshio(filename, mesh_in)
      mesh = pv.read_meshio(filename)
  
      # Assert mesh is still the same
      assert np.allclose(mesh_in.points, mesh.points)
      if (mesh_in.celltypes == 11).all():
          cells = mesh_in.cells.reshape((mesh_in.n_cells, 9))[
              :, [0, 1, 2, 4, 3, 5, 6, 8, 7]
          ].ravel()
          assert np.allclose(cells, mesh.cells)
      else:
          assert np.allclose(mesh_in.cells, mesh.cells)
      for k, v in mesh_in.point_data.items():
          assert np.allclose(v, mesh.point_data[k.replace(" ", "_")])
      for k, v in mesh_in.cell_data.items():
          assert np.allclose(v, mesh.cell_data[k.replace(" ", "_")])
  
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 1 for calling a global function with example usage: test_meshio(mesh_in, tmpdir) without return types