code: def main():
      from setuptools import setup, find_packages
  
      thispath, _ = os.path.split(__file__)
  
      testdatafiles = [
          pjoin("testing", "data", val)
          for val in os.listdir(
              pjoin(thispath, "nipype", "testing", "data")
          )
          if not os.path.isdir(
              pjoin(thispath, "nipype", "testing", "data", val)
          )
      ]
  
      testdatafiles += [
          pjoin("testing", "data", "dicomdir", "*"),
          pjoin("testing", "data", "bedpostxout", "*"),
          pjoin("testing", "data", "tbss_dir", "*"),
          pjoin("testing", "data", "brukerdir", "fid"),
          pjoin("testing", "data", "brukerdir", "pdata", "1", "*"),
          pjoin("testing", "data", "ds005", "*"),
          pjoin("testing", "data", "realign_json.json"),
          pjoin("workflows", "data", "*"),
          pjoin("pipeline", "engine", "report_template.html"),
          pjoin("external", "d3.js"),
          pjoin("interfaces", "fsl", "model_templates", "*"),
          pjoin("interfaces", "tests", "use_resources"),
          "pytest.ini",
          "conftest.py",
      ]
  
      # Python 3: use a locals dictionary
      # http://stackoverflow.com/a/1463370/6820620
      ldict = locals()
      # Get version and release info, which is all stored in nipype/info.py
      ver_file = os.path.join(thispath, "nipype", "info.py")
      with open(ver_file) as infofile:
          exec(infofile.read(), globals(), ldict)
  
      setup(
          name=ldict["NAME"],
          maintainer=ldict["MAINTAINER"],
          maintainer_email=ldict["MAINTAINER_EMAIL"],
          description=ldict["DESCRIPTION"],
          long_description=ldict["LONG_DESCRIPTION"],
          long_description_content_type="text/x-rst",
          url=ldict["URL"],
          download_url=ldict["DOWNLOAD_URL"],
          license=ldict["LICENSE"],
          classifiers=ldict["CLASSIFIERS"],
          author=ldict["AUTHOR"],
          author_email=ldict["AUTHOR_EMAIL"],
          platforms=ldict["PLATFORMS"],
          version=ldict["VERSION"],
          python_requires=ldict["PYTHON_REQUIRES"],
          install_requires=ldict["REQUIRES"],
          provides=ldict["PROVIDES"],
          packages=find_packages(),
          package_data={"nipype": testdatafiles},
          cmdclass={"build_py": BuildWithCommitInfoCommand},
          tests_require=ldict["TESTS_REQUIRES"],
          zip_safe=False,
          extras_require=ldict["EXTRA_REQUIRES"],
          entry_points="""
             [console_scripts]
             nipypecli=nipype.scripts.cli:cli
          """,
      )
  
imports: import os
  from os.path import join
  from setuptools.command.build_py import build_py
label_desc: Use image node_id 1 for calling a global function with example usage: main() without return types