code: def setup_package():
      root = os.path.abspath(os.path.dirname(__file__))
      with chdir(root):
          if not is_source_release(root):
              generate_cython(root, "neuralcoref")
  
          include_dirs = [
              get_python_inc(plat_specific=True),
              os.path.join(root, "include"),
          ]
  
          if (
              ccompiler.new_compiler().compiler_type == "msvc"
              and msvccompiler.get_build_version() == 9
          ):
              include_dirs.append(
                  os.path.join(root, "include", "msvc9")
              )
  
          ext_modules = []
          for mod_name in MOD_NAMES:
              mod_path = mod_name.replace(".", "/") + ".cpp"
              extra_link_args = []
              # ???
              # Imported from patch from @mikepb
              # See Issue #267. Running blind here...
              if sys.platform == "darwin":
                  dylib_path = [
                      ".." for _ in range(mod_name.count("."))
                  ]
                  dylib_path = "/".join(dylib_path)
                  dylib_path = (
                      "@loader_path/%s/neuralcoref/platform/darwin/lib"
                      % dylib_path
                  )
                  extra_link_args.append("-Wl,-rpath,%s" % dylib_path)
              ext_modules.append(
                  Extension(
                      mod_name,
                      [mod_path],
                      language="c++",
                      include_dirs=include_dirs,
                      extra_link_args=extra_link_args,
                  )
              )
  
          setup(
              name="neuralcoref",
              version="4.0",
              description="Coreference Resolution in spaCy with Neural Networks",
              url="https://github.com/huggingface/neuralcoref",
              author="Thomas Wolf",
              author_email="thomwolf@gmail.com",
              ext_modules=ext_modules,
              classifiers=[
                  "Development Status :: 3 - Alpha",
                  "Environment :: Console",
                  "Intended Audience :: Developers",
                  "Intended Audience :: Science/Research",
                  "License :: OSI Approved :: MIT License",
                  "Operating System :: POSIX :: Linux",
                  "Operating System :: MacOS :: MacOS X",
                  "Operating System :: Microsoft :: Windows",
                  "Programming Language :: Cython",
                  "Programming Language :: Python :: 3.6",
                  "Programming Language :: Python :: 3.7",
                  "Programming Language :: Python :: 3.8",
                  "Topic :: Scientific/Engineering",
              ],
              install_requires=[
                  "numpy>=1.15.0",
                  "boto3",
                  "requests>=2.13.0,<3.0.0",
                  "spacy>=2.1.0,<3.0.0",
              ],
              setup_requires=["wheel", "spacy>=2.1.0,<3.0.0"],
              python_requires=">=3.6",
              packages=PACKAGES,
              package_data=PACKAGE_DATA,
              keywords="NLP chatbots coreference resolution",
              license="MIT",
              zip_safe=False,
              platforms="any",
              cmdclass={"build_ext": build_ext_subclass},
          )
  
imports: import os
  import subprocess
  import sys
  import contextlib
  from distutils.command.build_ext import build_ext
  from distutils.sysconfig import get_python_inc
  import distutils.util
  from distutils import ccompiler, msvccompiler
  from setuptools import Extension, setup, find_packages
label_desc: Use image node_id 5 for calling a global function with example usage: setup_package() without return types