code: def get_extensions():
      this_dir = os.path.dirname(os.path.abspath(__file__))
      ext_dir = os.path.join(this_dir, "monai", "csrc")
      include_dirs = [ext_dir]
  
      source_cpu = glob.glob(
          os.path.join(ext_dir, "**", "*.cpp"), recursive=True
      )
      source_cuda = glob.glob(
          os.path.join(ext_dir, "**", "*.cu"), recursive=True
      )
  
      extension = None
      define_macros = [
          (f"{torch_parallel_backend()}", 1),
          ("MONAI_TORCH_VERSION", TORCH_VERSION),
      ]
      extra_compile_args = {}
      extra_link_args = []
      sources = source_cpu
      if BUILD_CPP:
          extension = CppExtension
          extra_compile_args.setdefault("cxx", [])
          if torch_parallel_backend() == "AT_PARALLEL_OPENMP":
              extra_compile_args["cxx"] += omp_flags()
          extra_link_args = omp_flags()
      if BUILD_CUDA:
          extension = CUDAExtension
          sources += source_cuda
          define_macros += [("WITH_CUDA", None)]
          extra_compile_args = {"cxx": [], "nvcc": []}
          if torch_parallel_backend() == "AT_PARALLEL_OPENMP":
              extra_compile_args["cxx"] += omp_flags()
      if extension is None or not sources:
          return []  # compile nothing
  
      ext_modules = [
          extension(
              name="monai._C",
              sources=sources,
              include_dirs=include_dirs,
              define_macros=define_macros,
              extra_compile_args=extra_compile_args,
              extra_link_args=extra_link_args,
          )
      ]
      return ext_modules
  
file_path: MONAI/setup.py
imports: from __future__ import annotations
  import glob
  import os
  import re
  import sys
  import warnings
  import pkg_resources
  from setuptools import find_packages, setup
  import versioneer
label_desc: Use image node_id 3 for calling a global function with example usage: get_extensions() and returns: ext_modules, list