code: def _slow_calculate_normals(rr, tris):
      """Efficiently compute vertex normals for triangulated surface"""
      # first, compute triangle normals
      rr = rr.astype(np.float64)
      r1 = rr[tris[:, 0], :]
      r2 = rr[tris[:, 1], :]
      r3 = rr[tris[:, 2], :]
      tri_nn = np.cross((r2 - r1), (r3 - r1))
  
      #   Triangle normals and areas
      size = np.sqrt(np.sum(tri_nn * tri_nn, axis=1))
      zidx = np.where(size == 0)[0]
      size[zidx] = 1.0  # prevent ugly divide-by-zero
      tri_nn /= size[:, np.newaxis]
  
      # accumulate the normals
      nn = np.zeros((len(rr), 3))
      for p, verts in enumerate(tris):
          nn[verts] += tri_nn[p, :]
      size = np.sqrt(np.sum(nn * nn, axis=1))
      size[size == 0] = 1.0  # prevent ugly divide-by-zero
      nn /= size[:, np.newaxis]
      return nn
  
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 4 for calling a global function with example usage: _slow_calculate_normals(rr, tris) and returns: nn