docstr: Return the list of symbols that a shared extension has to
  export.  This either uses 'ext.export_symbols' or, if it's not
  provided, "PyInit_" + module_name.  Only relevant on Windows, where
  the .pyd file (DLL) must export the module "PyInit_" function.
docstr_tok: ["Return","the","list","of","symbols","that","a","shared","extension","has","to","export",".","This","either","uses","'ext.export_symbols","'","or",",","if","it","'s","not","provided",",","``","PyInit_","''","+","module_name",".","Only","relevant","on","Windows",",","where","the",".pyd","file","(","DLL",")","must","export","the","module","``","PyInit_","''","function","."]
code: def get_export_symbols(self, ext):
      """Return the list of symbols that a shared extension has to
      export.  This either uses 'ext.export_symbols' or, if it's not
      provided, "PyInit_" + module_name.  Only relevant on Windows, where
      the .pyd file (DLL) must export the module "PyInit_" function.
      """
      name = ext.name.split(".")[-1]
      try:
          # Unicode module name support as defined in PEP-489
          # https://peps.python.org/pep-0489/#export-hook-name
          name.encode("ascii")
      except UnicodeEncodeError:
          suffix = "U_" + name.encode("punycode").replace(
              b"-", b"_"
          ).decode("ascii")
      else:
          suffix = "_" + name
  
      initfunc_name = "PyInit" + suffix
      if initfunc_name not in ext.export_symbols:
          ext.export_symbols.append(initfunc_name)
      return ext.export_symbols
  
imports: import contextlib
  import os
  import re
  import sys
  from ..core import Command
  from ..errors import DistutilsOptionError, DistutilsSetupError, CCompilerError, DistutilsError, CompileError, DistutilsPlatformError
  from ..sysconfig import customize_compiler, get_python_version
  from ..sysconfig import get_config_h_filename
  from .._modified import newer_group
  from ..extension import Extension
  from ..util import get_platform
  from distutils._log import log
  from .None import py37compat
  from site import USER_BASE
label_desc: Use image node_id 17 for calling the build_ext obj's underlying member method code with example usage: obj.get_export_symbols(ext) and returns: ext