code: def build_extension(self, ext):
      extdir = os.path.abspath(
          os.path.dirname(self.get_ext_fullpath(ext.name))
      )
  
      if not extdir.endswith(os.path.sep):
          extdir += os.path.sep
  
      cfg = "RelWithDebInfo" if self.debug else "Release"
  
      cmake_generator = os.environ.get("CMAKE_GENERATOR", "")
  
      cmake_args = [
          "-DCMAKE_INSTALL_PREFIX={}".format(extdir),
          "-DCMAKE_BUILD_TYPE={}".format(cfg),
          "-DPython3_FIND_VERSION={}.{}".format(
              sys.version_info.major, sys.version_info.minor
          ),
      ]
      build_args = []
  
      if self.compiler.compiler_type != "msvc":
          if not cmake_generator:
              cmake_args += ["-GNinja"]
  
      else:
          cmake_args += ["-A", WIN_ARCH[self.plat_name]]
          build_args += ["--config", cfg]
  
      if hasattr(self, "parallel") and self.parallel:
          build_args += ["--parallel {}".format(self.parallel)]
  
      if not os.path.exists(self.build_temp):
          os.makedirs(self.build_temp)
  
      subprocess.check_call(
          ["cmake", ext.sourcedir] + cmake_args, cwd=self.build_temp
      )
      subprocess.check_call(
          ["cmake", "--build", ".", "--target", "install"] + build_args,
          cwd=self.build_temp,
      )
  
file_path: neoml/NeoML/Python/setup.py
imports: import os
  import sys
  import subprocess
  import re
  from setuptools import setup, Extension, find_packages
  from setuptools.command.build_ext import build_ext
label_desc: Use image node_id 1 for calling the CMakeBuild obj's underlying member method code with example usage: obj.build_extension(ext) without return types