code: def triangles_area(triangles, vts):
      """Compute the local area of each triangle
  
      Parameters
      ----------
      triangles : [n, 3] -> m array
          A list of triangles from a mesh
      vts : [m, .] array
          List of vertices
  
      Returns
      -------
      triangles_area : [m] array
          List of area for each triangle in the mesh
  
      See Also
      --------
      random_coordinates_from_surface
      """
      e1 = vts[triangles[:, 1]] - vts[triangles[:, 0]]
      e2 = vts[triangles[:, 2]] - vts[triangles[:, 0]]
  
      # Compute the area of each triangle (e.q. 0.5 * length(scipy.cross(e1, e2))
      sqr_norms = np.sum(np.square(e1), axis=-1) * np.sum(
          np.square(e2), axis=-1
      )
      u_dot_v = np.sum(e1 * e2, axis=-1)
      tri_area = 0.5 * np.sqrt(sqr_norms - np.square(u_dot_v))
      return tri_area
  
imports: import numpy
label_desc: Use image node_id 3 for calling a global function with example usage: triangles_area(triangles, vts) and returns: tri_area