code: def faces_from_sphere_vertices(vertices):
      """
      Triangulate a set of vertices on the sphere.
  
      Parameters
      ----------
      vertices : (M, 3) ndarray
          XYZ coordinates of vertices on the sphere.
  
      Returns
      -------
      faces : (N, 3) ndarray
          Indices into vertices; forms triangular faces.
  
      """
      from scipy.spatial import Delaunay
  
      faces = Delaunay(vertices).convex_hull
      if len(vertices) < 2**16:
          return np.asarray(faces, np.uint16)
      else:
          return faces
  
imports: import numpy
  import warnings
  from scipy import optimize
  from dipy.core.geometry import cart2sphere, sphere2cart, vector_norm
  from dipy.core.onetime import auto_attr
  from dipy.reconst.recspeed import remove_similar_vertices
label_desc: Use image node_id 3 for calling a global function with example usage: faces_from_sphere_vertices(vertices) and returns: np, faces