code: def build_extensions(self):
      # We override this method entirely because the actual building is done
      # by cmake_build. Here we just copy the built extensions to the final
      # destination.
      build_lib = self.build_lib
      extension_dst_dir = os.path.join(build_lib, "onnx")
      os.makedirs(extension_dst_dir, exist_ok=True)
  
      for ext in self.extensions:
          fullname = self.get_ext_fullname(ext.name)
          filename = os.path.basename(self.get_ext_filename(fullname))
  
          if not WINDOWS:
              lib_dir = CMAKE_BUILD_DIR
          else:
              # Windows compiled extensions are stored in Release/Debug subfolders
              debug_lib_dir = os.path.join(CMAKE_BUILD_DIR, "Debug")
              release_lib_dir = os.path.join(CMAKE_BUILD_DIR, "Release")
              if os.path.exists(debug_lib_dir):
                  lib_dir = debug_lib_dir
              elif os.path.exists(release_lib_dir):
                  lib_dir = release_lib_dir
          src = os.path.join(lib_dir, filename)
          dst = os.path.join(extension_dst_dir, filename)
          self.copy_file(src, dst)
  
      # Copy over the generated python files to build/source dir depending on editable mode
      if self.editable_mode:
          dst_dir = TOP_DIR
      else:
          dst_dir = build_lib
  
      generated_py_files = glob.glob(
          os.path.join(CMAKE_BUILD_DIR, "onnx", "*.py")
      )
      generated_pyi_files = glob.glob(
          os.path.join(CMAKE_BUILD_DIR, "onnx", "*.pyi")
      )
      assert generated_py_files, "Bug: No generated python files found"
      assert generated_pyi_files, "Bug: No generated python stubs found"
      for src in (*generated_py_files, *generated_pyi_files):
          dst = os.path.join(
              dst_dir, os.path.relpath(src, CMAKE_BUILD_DIR)
          )
          os.makedirs(os.path.dirname(dst), exist_ok=True)
          self.copy_file(src, dst)
  
imports: import contextlib
  import datetime
  import glob
  import logging
  import multiprocessing
  import os
  import platform
  import shlex
  import shutil
  import subprocess
  import sys
  import sysconfig
  import textwrap
  from typing import ClassVar
  import setuptools
  import setuptools.command.build_ext
  import setuptools.command.build_py
  import setuptools.command.develop
label_desc: Use image node_id 2 for calling the BuildExt obj's underlying member method code with example usage: obj.build_extensions() without return types