code: def copy_extensions_to_source(self):
      build_py = self.get_finalized_command("build_py")
      for ext in self.extensions:
          fullname = self.get_ext_fullname(ext.name)
          filename = self.get_ext_filename(fullname)
          modpath = fullname.split(".")
          package = ".".join(modpath[:-1])
          package_dir = build_py.get_package_dir(package)
          dest_filename = os.path.join(
              package_dir, os.path.basename(filename)
          )
          src_filename = os.path.join(self.build_lib, filename)
  
          # Always copy, even if source is older than destination, to ensure
          # that the right extensions for the current Python/platform are
          # used.
          copy_file(
              src_filename,
              dest_filename,
              verbose=self.verbose,
              dry_run=self.dry_run,
          )
          if ext._needs_stub:
              self.write_stub(package_dir or os.curdir, ext, True)
  
imports: import os
  import sys
  import itertools
  from distutils.command.build_ext import build_ext
  from distutils.file_util import copy_file
  from distutils.ccompiler import new_compiler
  from distutils.sysconfig import customize_compiler, get_config_var
  from distutils.errors import DistutilsError
  from distutils import log
  from setuptools.extension import Library
  from setuptools.extern import six
  from distutils.sysconfig import _config_vars
label_desc: Use image node_id 2 for calling the build_ext obj's underlying member method code with example usage: obj.copy_extensions_to_source() without return types