code: def face_to_vertex_color(mesh, face_colors, dtype=np.uint8):
      
      rgba = to_rgba(face_colors)
      vertex_colors = mesh.faces_sparse.dot(
          rgba.astype(np.float64))
      vertex_colors /= mesh.faces_sparse.sum(axis=1)
      vertex_colors = vertex_colors.astype(dtype)
  
      return vertex_colors
docs: Convert a list of face colors into a list of vertex colors.
  
      Parameters
      -----------
      mesh : trimesh.Trimesh object
      face_colors: (n, (3,4)) int, face colors
      dtype:       data type of output
  
      Returns
      -----------
      vertex_colors: (m,4) dtype, colors for each vertex