code: def test_mesh_normals_length_method(length_method):
      size = (45, 40)
      with TestingCanvas(size=size, bgcolor="k") as c:
          v = c.central_widget.add_view(border_width=0)
          v.camera = "arcball"
          # Create visual.
          meshdata = create_sphere(radius=1.0)
          mesh = scene.visuals.Mesh(
              meshdata=meshdata,
              shading=None,
              color=(0.1, 0.1, 0.1, 1.0),
          )
          v.add(mesh)
  
          # The code below should not raise.
          # XXX(asnt): Not sure how to better test `length_method`.
          normals = scene.visuals.MeshNormals(
              meshdata, color=(1, 0, 0), length_method=length_method
          )
          normals.parent = mesh
          _ = c.render()
  
file_path: vispy/vispy/visuals/tests/test_mesh_normals.py
imports: import numpy
  import pytest
  from vispy import scene
  from vispy.geometry import create_sphere
  from vispy.testing import TestingCanvas, requires_application, run_tests_if_main, requires_pyopengl
label_desc: Use image node_id 5 for calling a global function with example usage: test_mesh_normals_length_method(length_method) without return types