code: def render_colors(vertices, triangles, colors, h, w, c=3, BG=None):
      """render mesh with colors
      Args:
          vertices: [nver, 3]
          triangles: [ntri, 3]
          colors: [nver, 3]
          h: height
          w: width
          c: channel
          BG: background image
      Returns:
          image: [h, w, c]. rendered image./rendering.
      """
  
      # initial
      if BG is None:
          image = np.zeros((h, w, c), dtype=np.float32)
      else:
          assert (
              BG.shape[0] == h and BG.shape[1] == w and BG.shape[2] == c
          )
          image = BG
      depth_buffer = (
          np.zeros([h, w], dtype=np.float32, order="C") - 999999.0
      )
  
      # change orders. --> C-contiguous order(column major)
      vertices = vertices.astype(np.float32).copy()
      triangles = triangles.astype(np.int32).copy()
      colors = colors.astype(np.float32).copy()
      ###
      st = time()
      mesh_core_cython.render_colors_core(
          image,
          vertices,
          triangles,
          colors,
          depth_buffer,
          vertices.shape[0],
          triangles.shape[0],
          h,
          w,
          c,
      )
      return image
  
file_path: insightface/python-package/insightface/thirdparty/face3d/mesh/render.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import numpy
  from time import time
  from .cython import mesh_core_cython
label_desc: Use image node_id 2 for calling a global function with example usage: render_colors(vertices, triangles, colors, h, w, c, BG) and returns: image