code: def compile_cpp():
      build_path = os.path.join(CURRENT_DIR, "build_cpp")
      if os.path.isdir(build_path):
          shutil.rmtree(build_path)
      os.makedirs(build_path)
      old_working_dir = os.getcwd()
      os.chdir(build_path)
      src_path = "../compile"
      cmake_cmd = ["cmake", src_path]
      if not os.path.isdir(src_path):
          print("current path: {}".format(os.getcwd()))
          raise Exception("{} not exists".format(src_path))
      if os.name == "nt":
          # Windows
          print("Windows users please use github installation.")
      else:
          # Linux, Darwin (OS X), etc.
          silent_call(
              cmake_cmd,
              raise_error=True,
              error_msg="Please install CMake first",
          )
          silent_call(
              ["make", "-j4"],
              raise_error=True,
              error_msg="An error has occurred while building xlearn library file",
          )
          suffix_list = ["dylib", "so"]
          for suffix in suffix_list:
              if os.path.isfile("lib/libxlearn_api.{}".format(suffix)):
                  shutil.copy(
                      "lib/libxlearn_api.{}".format(suffix),
                      "../xlearn/",
                  )
          if os.path.isdir("../build/lib/xlearn/"):
              for suffix in suffix_list:
                  if os.path.isfile(
                      "lib/libxlearn_api.{}".format(suffix)
                  ):
                      shutil.copy(
                          "lib/libxlearn_api.{}".format(suffix),
                          "../build/lib/xlearn/",
                      )
  
      os.chdir(old_working_dir)
  
imports: from __future__ import absolute_import
  import os
  import subprocess
  import shutil
  import sys
  from setuptools import find_packages
  from setuptools import setup
  from setuptools.command.build_py import build_py
  from setuptools.command.install import install
  from setuptools.command.sdist import sdist
label_desc: Use image node_id 3 for calling a global function with example usage: compile_cpp() without return types