code: def test_mesh_wireframe_filter():
      size = (45, 40)
      with TestingCanvas(size=size, bgcolor="k") as c:
          v = c.central_widget.add_view(border_width=0)
          # Create visual
          mdata = create_sphere(20, 40, radius=20)
          mesh = scene.visuals.Mesh(
              meshdata=mdata, shading=None, color=(0.1, 0.3, 0.7, 0.9)
          )
          wireframe_filter = WireframeFilter(color="red")
          mesh.attach(wireframe_filter)
          v.add(mesh)
          from vispy.visuals.transforms import STTransform
  
          mesh.transform = STTransform(translate=(20, 20))
          mesh.transforms.scene_transform = STTransform(
              scale=(1, 1, 0.01)
          )
  
          rendered_with_wf = c.render()
          assert np.unique(rendered_with_wf[..., 0]).size >= 50
  
          wireframe_filter.enabled = False
          rendered_wo_wf = c.render()
          # the result should be completely different
          # assert not allclose
          pytest.raises(
              AssertionError,
              np.testing.assert_allclose,
              rendered_with_wf,
              rendered_wo_wf,
          )
  
          wireframe_filter.enabled = True
          wireframe_filter.wireframe_only = True
          rendered_with_wf_only = c.render()
          # the result should be different from the two cases above
          pytest.raises(
              AssertionError,
              np.testing.assert_allclose,
              rendered_with_wf_only,
              rendered_with_wf,
          )
          pytest.raises(
              AssertionError,
              np.testing.assert_allclose,
              rendered_with_wf_only,
              rendered_wo_wf,
          )
  
          wireframe_filter.enabled = True
          wireframe_filter.wireframe_only = False
          wireframe_filter.faces_only = True
          rendered_with_faces_only = c.render()
          # the result should be different from the cases above
          pytest.raises(
              AssertionError,
              np.testing.assert_allclose,
              rendered_with_faces_only,
              rendered_with_wf,
          )
          pytest.raises(
              AssertionError,
              np.testing.assert_allclose,
              rendered_with_faces_only,
              rendered_wo_wf,
          )
          pytest.raises(
              AssertionError,
              np.testing.assert_allclose,
              rendered_with_faces_only,
              rendered_with_wf_only,
          )
  
file_path: vispy/vispy/visuals/tests/test_mesh.py
imports: import numpy
  from vispy import scene
  from vispy.color import Color
  from vispy.geometry import create_cube, create_sphere
  from vispy.testing import TestingCanvas, requires_application, run_tests_if_main, requires_pyopengl
  from vispy.visuals.filters import ShadingFilter, WireframeFilter
  from vispy.visuals.filters.mesh import _as_rgba
  import pytest
label_desc: Use image node_id 9 for calling a global function with example usage: test_mesh_wireframe_filter() without return types