code: def test_wavefront_non_triangular():
      """Test wavefront writing with non-triangular faces"""
      vertices = np.array(
          [
              [0.5, 1.375, 0.0],
              [0.5, 0.625, 0.0],
              [3.25, 1.0, 0.0],
              [1.0, 0.375, 0.0],
              [2.0, 0.375, 0.0],
              [1.5, 0.625, 0.0],
              [1.5, 1.375, 0.0],
              [1.0, 1.625, 0.0],
              [2.0, 1.625, 0.0],
          ]
      )
  
      faces = np.array(
          [[1, 0, 7, 6, 5, 3], [4, 5, 6, 8, 2]], dtype=object
      )
      fname_out = op.join(temp_dir, "temp.obj")
      write_mesh(
          fname_out,
          vertices=vertices,
          faces=faces,
          normals=None,
          texcoords=None,
          overwrite=True,
          reshape_faces=False,
      )
      assert_raises(RuntimeError, read_mesh, fname_out)
      with open(fname_out, "r+") as out_file:
          lines = out_file.readlines()
      assert lines[-1].startswith("f 5 6 7 9 3")
      assert lines[-2].startswith("f 2 1 8 7 6 4")
  
file_path: vispy/vispy/io/tests/test_io.py
imports: import numpy
  from os import path
  from numpy.testing import assert_allclose, assert_array_equal
  from vispy.io import write_mesh, read_mesh, load_data_file
  from vispy.geometry import _fast_cross_3d
  from vispy.util import _TempDir
  from vispy.testing import run_tests_if_main, assert_equal, assert_raises, requires_ssl
label_desc: Use image node_id 2 for calling a global function with example usage: test_wavefront_non_triangular() without return types