code: def locate_cuda():
      """Locate the CUDA environment on the system
  
      Returns a dict with keys 'home', 'nvcc', 'include', and 'lib64'
      and values giving the absolute path to each directory.
  
      Starts by looking for the CUDAHOME env variable. If not found, everything
      is based on finding 'nvcc' in the PATH.
      """
  
      # first check if the CUDAHOME env variable is in use
      if "CUDAHOME" in os.environ:
          home = os.environ["CUDAHOME"]
          nvcc = pjoin(home, "bin", "nvcc")
      else:
          # otherwise, search the PATH for NVCC
          default_path = pjoin(os.sep, "usr", "local", "cuda", "bin")
          nvcc = find_in_path(
              "nvcc", os.environ["PATH"] + os.pathsep + default_path
          )
          if nvcc is None:
              raise EnvironmentError(
                  "The nvcc binary could not be "
                  "located in your $PATH. Either add it to your path, or set $CUDAHOME"
              )
          home = os.path.dirname(os.path.dirname(nvcc))
  
      cudaconfig = {
          "home": home,
          "nvcc": nvcc,
          "include": pjoin(home, "include"),
          "lib64": pjoin(home, "lib64"),
      }
      for k, v in cudaconfig.items():
          if not os.path.exists(v):
              raise EnvironmentError(
                  "The CUDA %s path could not be located in %s" % (k, v)
              )
  
      return cudaconfig
  
file_path: insightface/detection/retinaface/rcnn/cython/setup.py
imports: import os
  from os.path import join
  from setuptools import setup
  from distutils.extension import Extension
  from Cython.Distutils import build_ext
  import numpy
label_desc: Use image node_id 2 for calling a global function with example usage: locate_cuda() and returns: cudaconfig