code: def write_obj_with_colors_texture(
      obj_name, vertices, triangles, colors, texture, uv_coords
  ):
      """Save 3D face model with texture.
      Ref: https://github.com/patrikhuber/eos/blob/bd00155ebae4b1a13b08bf5a991694d682abbada/include/eos/core/Mesh.hpp
      Args:
          obj_name: str
          vertices: shape = (nver, 3)
          triangles: shape = (ntri, 3)
          colors: shape = (nver, 3)
          texture: shape = (256,256,3)
          uv_coords: shape = (nver, 3) max value<=1
      """
      if obj_name.split(".")[-1] != "obj":
          obj_name = obj_name + ".obj"
      mtl_name = obj_name.replace(".obj", ".mtl")
      texture_name = obj_name.replace(".obj", "_texture.png")
  
      triangles = triangles.copy()
      triangles += 1  # mesh lab start with 1
  
      # write obj
      vertices, colors, uv_coords = (
          vertices.astype(np.float32).copy(),
          colors.astype(np.float32).copy(),
          uv_coords.astype(np.float32).copy(),
      )
      mesh_core_cython.write_obj_with_colors_texture_core(
          str.encode(obj_name),
          str.encode(os.path.abspath(mtl_name)),
          vertices,
          triangles,
          colors,
          uv_coords,
          vertices.shape[0],
          triangles.shape[0],
          uv_coords.shape[0],
      )
  
      # write mtl
      with open(mtl_name, "w") as f:
          f.write("newmtl FaceTexture\n")
          s = "map_Kd {}\n".format(
              os.path.abspath(texture_name)
          )  # map to image
          f.write(s)
  
      # write texture as png
      io.imsave(texture_name, texture)
  
file_path: insightface/python-package/insightface/thirdparty/face3d/mesh/io.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import numpy
  import os
  from skimage import io
  from time import time
  from .cython import mesh_core_cython
label_desc: Use image node_id 5 for calling a global function with example usage: write_obj_with_colors_texture(obj_name, vertices, triangles, colors, texture, uv_coords) without return types