code: def _triangulate_cpp(vertices_2d, segments):
      import triangle
  
      T = triangle.triangulate(
          {"vertices": vertices_2d, "segments": segments}, "p"
      )
      vertices_2d = T["vertices"]
      triangles = T["triangles"]
      return vertices_2d, triangles
  
imports: from __future__ import division, print_function
  from itertools import permutations
  import numpy
  from collections import OrderedDict
label_desc: Use image node_id 2 for calling a global function with example usage: _triangulate_cpp(vertices_2d, segments) and returns: vertices_2d,  triangles