code: def do_setup():
      # setup the config
      metadata = dict(
          name=PYPIDIST,
          # packages=[DISTNAME],
          maintainer=MAINTAINER,
          maintainer_email=MAINTAINER_EMAIL,
          description=DESCRIPTION,
          license=LICENSE,
          url=URL,
          download_url=DOWNLOAD_URL,
          project_urls=PROJECT_URLS,
          version=VERSION,
          long_description=LONG_DESCRIPTION,
          long_description_content_type="text/markdown",
          classifiers=[
              "Intended Audience :: Science/Research",
              "Intended Audience :: Developers",
              "Intended Audience :: Financial and Insurance Industry",
              "Programming Language :: C",
              "Programming Language :: Python",
              "Topic :: Software Development",
              "Topic :: Scientific/Engineering",
              "Operating System :: Microsoft :: Windows",
              "Operating System :: POSIX",
              "Operating System :: Unix",
              "Operating System :: MacOS",
              "Programming Language :: Python :: 3",
              "Programming Language :: Python :: 3.7",
              "Programming Language :: Python :: 3.8",
              "Programming Language :: Python :: 3.9",
              "Programming Language :: Python :: 3.10",
              "Programming Language :: Python :: 3.11",
              "Programming Language :: Python :: 3.12",
              (
                  "Programming Language :: Python :: "
                  "Implementation :: CPython"
              ),
          ],
          cmdclass=cmdclass,
          python_requires=f">={MIN_PYTHON[0]}.{MIN_PYTHON[1]}",
          install_requires=REQUIREMENTS,
          # Adapted from: https://github.com/inmanta/inmanta/pull/83
          # See also: https://github.com/pypa/setuptools/issues/3197
          packages=find_packages(),
          # We have a MANIFEST.in, so I'm not convinced this is fully
          # necessary, but better to be safe since we've had sdist
          # problems in the past...
          package_data=dict(
              DISTNAME=[
                  "*",
                  "pmdarima/*",
                  "pmdarima/VERSION",
                  "pmdarima/__check_build/*",
                  "pmdarima/_build_utils/*",
                  "pmdarima/arima/*",
                  "pmdarima/arima/tests/data/*",
                  "pmdarima/compat/*",
                  "pmdarima/datasets/*",
                  "pmdarima/datasets/data/*",
                  "pmdarima/model_selection/*",
                  "pmdarima/preprocessing/*",
                  "pmdarima/preprocessing/endog/*",
                  "pmdarima/preprocessing/exog/*",
                  "pmdarima/tests/*",
                  "pmdarima/utils/*",
              ]
          ),
          keywords="arima timeseries forecasting pyramid pmdarima "
          "pyramid-arima scikit-learn statsmodels",
          **extra_setuptools_args,
      )
  
      if len(sys.argv) == 1 or (
          len(sys.argv) >= 2
          and (
              "--help" in sys.argv[1:]
              or sys.argv[1]
              in (
                  "--help-commands",
                  "egg_info",
                  "dist_info",
                  "--version",
                  "clean",
              )
          )
      ):
          # For these actions, NumPy is not required, so we can import the
          # setuptools module. However this is not preferable... the moment
          # setuptools is imported, it monkey-patches distutils' setup and
          # changes its behavior...
          # (https://github.com/scikit-learn/scikit-learn/issues/1016)
          #
          # This is called when installing from pip and numpy might not
          # be on the system yet
          try:
              from setuptools import setup
  
              print("Setting up with setuptools")
          except ImportError:
              print("Setting up with distutils")
              from distutils.core import setup
  
          metadata["version"] = VERSION
  
      else:
          if sys.version_info < MIN_PYTHON:
              raise RuntimeError(
                  # Don't make this an F-string so that the error can be rendered
                  # on older versions of python
                  "pmdarima requires Python {0}.{1} or later. The current "
                  "Python version is {2} installed in {3}.".format(
                      MIN_PYTHON[0],
                      MIN_PYTHON[1],
                      platform.python_version(),
                      sys.executable,
                  )
              )
  
          # for sdist, use setuptools so we get the long_description_content_type
          if "sdist" in sys.argv or IS_PYTHON_312:
              from setuptools import setup
  
              print("Setting up with setuptools")
  
              # TODO: distutils is removed in Python 3.12+, so this should probably be the default
              if IS_PYTHON_312:
                  from setuptools import Extension
  
                  import numpy
  
                  include_dirs = [numpy.get_include()]
                  metadata["ext_modules"] = [
                      Extension(
                          name="pmdarima.arima._arima",
                          sources=["pmdarima/arima/_arima.pyx"],
                          include_dirs=include_dirs,
                      ),
                      Extension(
                          name="pmdarima.preprocessing.exog._fourier",
                          sources=[
                              "pmdarima/preprocessing/exog/_fourier.pyx"
                          ],
                          include_dirs=include_dirs,
                      ),
                      Extension(
                          name="pmdarima.utils._array",
                          sources=["pmdarima/utils/_array.pyx"],
                          include_dirs=include_dirs,
                      ),
                      Extension(
                          name="pmdarima.__check_build._check_build",
                          sources=[
                              "pmdarima/__check_build/_check_build.pyx"
                          ],
                          include_dirs=include_dirs,
                      ),
                  ]
          else:
              # we should only need numpy for building. Everything else can be
              # collected via install_requires above
              check_package_status("numpy", "1.16")
  
              from numpy.distutils.core import setup
  
              print("Setting up with numpy.distutils.core")
  
          # add the config to the metadata
          metadata["configuration"] = configuration
  
      # call setup on the dict
      setup(**metadata)
  
file_path: pmdarima/setup.py
imports: import sys
  import os
  import platform
  import shutil
  from distutils.command.clean import clean
  from packaging.version import Version
  from setuptools import find_packages
  import traceback
  import importlib
  import builtins
  import pmdarima
label_desc: Use image node_id 3 for calling a global function with example usage: do_setup() without return types