code: def finalize_options(self):
      _build_ext.finalize_options(self)
      self.extensions = self.extensions or []
      self.check_extensions_list(self.extensions)
      self.shlibs = [
          ext for ext in self.extensions if isinstance(ext, Library)
      ]
      if self.shlibs:
          self.setup_shlib_compiler()
      for ext in self.extensions:
          ext._full_name = self.get_ext_fullname(ext.name)
      for ext in self.extensions:
          fullname = ext._full_name
          self.ext_map[fullname] = ext
  
          # distutils 3.1 will also ask for module names
          # XXX what to do with conflicts?
          self.ext_map[fullname.split(".")[-1]] = ext
  
          ltd = self.shlibs and self.links_to_dynamic(ext) or False
          ns = ltd and use_stubs and not isinstance(ext, Library)
          ext._links_to_dynamic = ltd
          ext._needs_stub = ns
          filename = ext._file_name = self.get_ext_filename(fullname)
          libdir = os.path.dirname(
              os.path.join(self.build_lib, filename)
          )
          if ltd and libdir not in ext.library_dirs:
              ext.library_dirs.append(libdir)
          if (
              ltd
              and use_stubs
              and os.curdir not in ext.runtime_library_dirs
          ):
              ext.runtime_library_dirs.append(os.curdir)
  
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 5 for calling the build_ext obj's underlying member method code with example usage: obj.finalize_options() without return types