code: def customize_compiler_for_nvcc(self):
      """This is a verbatim copy of the NVCC compiler extension from
      https://github.com/rmcgibbo/npcuda-example
      """
      self.src_extensions.append(".cu")
      default_compiler_so = self.compiler_so
      super = self._compile
  
      def _compile(obj, src, ext, cc_args, extra_postargs, pp_opts):
          if os.path.splitext(src)[1] == ".cu":
              self.set_executable("compiler_so", CUDA["nvcc"])
              postargs = extra_postargs["nvcc"]
          else:
              postargs = extra_postargs["cc"]
  
          super(obj, src, ext, cc_args, postargs, pp_opts)
          self.compiler_so = default_compiler_so
  
      self._compile = _compile
  
file_path: somoclu/src/Python/setup.py
imports: from setuptools import setup, Extension
  from setuptools.command.build_ext import build_ext
  import numpy
  import os
  import sys
  import platform
  import traceback
label_desc: Use image node_id 2 for calling a global function with example usage: customize_compiler_for_nvcc() without return types