code: def build_cmake(self, ext):
      # Make build directory
      distutils.dir_util.mkpath(self.build_temp)
  
      # Ensure lib output directory is made
      lib_output_dir = os.path.join(
          here, os.path.dirname(self.get_ext_fullpath(ext.name))
      )
      distutils.dir_util.mkpath(lib_output_dir)
  
      # example of cmake args
      config = "Debug" if self.distribution.debug else "Release"
  
      cmake_args = [
          "-DCMAKE_BUILD_TYPE=" + config,
          "-DPY_VERSION=" + "{v[0]}.{v[1]}".format(v=version_info),
          "-DBUILD_PYTHON=On",
          "-DBUILD_TESTING=Off",
          "-DWARNINGS=Off",
          "-DVW_FEAT_CB_GRAPH_FEEDBACK=On",
      ]
  
      # This doesn't work as expected for Python3.6 and 3.7 on Windows.
      # See bug: https://bugs.python.org/issue39825
      if system == "Windows" and sys.version_info.minor < 8:
          from distutils import sysconfig as distutils_sysconfig
  
          required_shared_lib_suffix = (
              distutils_sysconfig.get_config_var("EXT_SUFFIX")
          )
      else:
          import sysconfig
  
          required_shared_lib_suffix = sysconfig.get_config_var(
              "EXT_SUFFIX"
          )
  
      if required_shared_lib_suffix is not None:
          cmake_args += [
              "-DVW_PYTHON_SHARED_LIB_SUFFIX={}".format(
                  required_shared_lib_suffix
              )
          ]
  
      if self.distribution.enable_boost_cmake is None:
          # Add this flag as default since testing indicates its safe.
          # But add a way to disable it in case it becomes a problem
          cmake_args += ["-DBoost_NO_BOOST_CMAKE=ON"]
  
      if self.distribution.cmake_options is not None:
          argslist = self.distribution.cmake_options.split(";")
          cmake_args += argslist
  
      # If we are being installed in a conda environment then use the dependencies from there.
      if "CONDA_PREFIX" in os.environ:
          cmake_args.append(
              "-DCMAKE_PREFIX_PATH={}".format(
                  os.environ["CONDA_PREFIX"]
              )
          )
          cmake_args.append(
              "-DPython_INCLUDE_DIR={}".format(get_python_inc())
          )
  
      # example of build args
      build_args = ["--config", config]
  
      cmake_generator = self.distribution.cmake_generator
  
      if system == "Windows":
          cmake_args += [
              "-DCMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG="
              + str(lib_output_dir),
              "-DCMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE="
              + str(lib_output_dir),
          ]
  
          if cmake_generator is None:
              cmake_generator = "Visual Studio 15 2017 Win64"
  
          build_args += ["--target", "pylibvw"]
  
          if self.distribution.vcpkg_root is not None:
              # add the vcpkg toolchain if its provided
              abs_vcpkg_path = os.path.abspath(
                  self.distribution.vcpkg_root
              )
              vcpkg_toolchain = os.path.join(
                  abs_vcpkg_path,
                  "scripts",
                  "buildsystems",
                  "vcpkg.cmake",
              )
              cmake_args += [
                  "-DCMAKE_TOOLCHAIN_FILE=" + vcpkg_toolchain
              ]
  
      else:
          cmake_args += [
              "-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=" + str(lib_output_dir),
          ]
          build_args += [
              "--",
              "-j{}".format(multiprocessing.cpu_count()),
              # Build the pylibvw target
              "pylibvw",
          ]
  
      if cmake_generator is not None:
          cmake_args += ["-G", cmake_generator]
  
          if cmake_generator == "Visual Studio 16 2019":
              # The VS2019 generator now uses the -A option to select the toolchain's architecture
              cmake_args += ["-Ax64"]
  
      os.chdir(str(self.build_temp))
      self.spawn(["cmake"] + cmake_args + [str(here)])
      if not self.dry_run:
          self.spawn(["cmake", "--build", "."] + build_args)
      os.chdir(str(here))
  
imports: import distutils.dir_util
  import os
  import platform
  import sys
  from codecs import open
  from distutils.command.clean import clean
  from distutils.sysconfig import get_python_inc
  from setuptools import setup, Extension, find_packages, Distribution
  from setuptools.command.build_ext import build_ext
  from setuptools.command.sdist import sdist
  from setuptools.command.install_lib import install_lib
  from shutil import rmtree
  import multiprocessing
label_desc: Use image node_id 2 for calling the BuildPyLibVWBindingsModule obj's underlying member method code with example usage: obj.build_cmake(ext) without return types