code: def setup_package():
      # ipex is only avaliable for linux now
      pytorch_20_requires = [
          "torch==2.0.0",
          "torchvision==0.15.1",
          "intel_extension_for_pytorch==2.0.100;platform_system=='Linux'",
      ]
  
      pytorch_113_requires = [
          "torch==1.13.1",
          "torchvision==0.14.1",
          "intel_extension_for_pytorch==1.13.100;platform_system=='Linux'",
      ]
  
      # xpu should be installed with -f https://developer.intel.com/ipex-whl-stable-xpu
      pytorch_113_xpu_requires = [
          "torch==1.13.0a0+git6c9b55e",
          "torchvision==0.14.1a0",
          "intel_extension_for_pytorch==1.13.120+xpu;platform_system=='Linux'",
      ]
  
      pytorch_20_xpu_requires = [
          "torch==2.0.1a0",
          "torchvision==0.15.2a0",
          "intel_extension_for_pytorch==2.0.110+xpu;platform_system=='Linux'",
      ]
  
      pytorch_112_requires = [
          "torch==1.12.1",
          "torchvision==0.13.1",
          "intel_extension_for_pytorch==1.12.300;platform_system=='Linux'",
      ]
  
      pytorch_111_requires = [
          "torch==1.11.0",
          "torchvision==0.12.0",
          "intel_extension_for_pytorch==1.11.0;platform_system=='Linux'",
      ]
  
      pytorch_110_requires = [
          "torch==1.10.1",
          "torchvision==0.11.2",
          "intel_extension_for_pytorch==1.10.100;platform_system=='Linux'",
      ]
  
      # this require install option --extra-index-url https://download.pytorch.org/whl/nightly/
      pytorch_nightly_requires = [
          "torch~=1.14.0.dev",
          "torchvision~=0.15.0.dev",
      ]
  
      pytorch_common_requires = [
          "pytorch_lightning==1.6.4",
          "torchmetrics==0.11.0",
          "opencv-python-headless",
          "PyTurboJPEG",
          "opencv-transforms",
          "cryptography==41.0.3",
      ]
  
      # default pytorch_dep
      pytorch_requires = pytorch_113_requires + pytorch_common_requires
      pytorch_20_requires += pytorch_common_requires
      pytorch_113_requires += pytorch_common_requires
      pytorch_113_xpu_requires += pytorch_common_requires
      pytorch_112_requires += pytorch_common_requires
      pytorch_111_requires += pytorch_common_requires
      pytorch_110_requires += pytorch_common_requires
      pytorch_nightly_requires += pytorch_common_requires
  
      inference_requires = [
          "onnx==1.12.0",
          "onnxruntime==1.12.1",
          "onnxruntime-extensions==0.7.0; platform_system!='Darwin'",
          "onnxruntime-extensions==0.3.1; (platform_machine=='x86_64' or platform_machine == 'AMD64') and \
                            platform_system=='Darwin'",
          "openvino-dev==2022.3.0",
          "scipy<=1.10.1",
          "neural-compressor==2.0; platform_system!='Windows'",
          "onnxsim==0.4.8; platform_system!='Darwin'",
          "onnxsim==0.4.1; (platform_machine=='x86_64' or platform_machine == 'AMD64') and \
                            platform_system=='Darwin'",
      ]
  
      install_requires = [
          "intel-openmp; (platform_machine=='x86_64' or platform_machine == 'AMD64')",
          "cloudpickle",
          "protobuf==3.19.5",
          "py-cpuinfo",
          "pyyaml",
          "packaging",
          "sigfig",
          "setuptools<66",
      ]
  
      # diffusion requires
      diffusion_requires = pytorch_requires + [
          "diffusers==0.14.0",
          "transformers==4.34.0",
      ]
  
      package_data = [
          "libs/libjemalloc.so",
          "libs/libturbojpeg.so.0.2.0",
          "libs/libtcmalloc.so",
      ]
  
      for url in lib_urls:
          download_libs(url)
  
      scripts = [
          "scripts/bigdl-nano-init",
          "scripts/bigdl-nano-init.ps1",
          "scripts/bigdl-nano-unset-env",
          "scripts/bigdl-nano-unset-env.ps1",
      ]
  
      metadata = dict(
          name="bigdl-nano",
          version=VERSION,
          description="High-performance scalable acceleration components for intel.",
          long_description=long_description,
          long_description_content_type="text/markdown",
          author="BigDL Authors",
          author_email="bigdl-user-group@googlegroups.com",
          url="https://github.com/intel-analytics/BigDL",
          install_requires=install_requires,
          extras_require={
              "pytorch": pytorch_requires,
              "pytorch_20": pytorch_20_requires,
              "pytorch_113": pytorch_113_requires,
              "pytorch_112": pytorch_112_requires,
              "pytorch_111": pytorch_111_requires,
              "pytorch_110": pytorch_110_requires,
              "pytorch_113_xpu": pytorch_113_xpu_requires,
              "pytorch_20_xpu": pytorch_20_xpu_requires,
              "pytorch_nightly": pytorch_nightly_requires,
              "inference": inference_requires,
              "diffusion_113": diffusion_requires,
          },
          package_data={"bigdl.nano": package_data},
          scripts=scripts,
          package_dir={"": "src"},
          entry_points={
              "console_scripts": ["bigdl-submit=bigdl.nano.k8s:main"],
          },
          packages=get_nano_packages(),
      )
      setup(**metadata)
  
imports: import fnmatch
  from setuptools import setup
  import urllib.request
  import os
  import stat
label_desc: Use image node_id 3 for calling a global function with example usage: setup_package() without return types