code: def get_cuda_path():
      global _cuda_path
  
      # Use a magic word to represent the cache not filled because None is a
      # valid return value.
      if _cuda_path != "NOT_INITIALIZED":
          return _cuda_path
  
      nvcc_path = utils.search_on_path(("nvcc", "nvcc.exe"))
      cuda_path_default = None
      if nvcc_path is not None:
          cuda_path_default = os.path.normpath(
              os.path.join(os.path.dirname(nvcc_path), "..")
          )
  
      cuda_path = os.environ.get(
          "CUDA_PATH", ""
      )  # Nvidia default on Windows
      if len(cuda_path) > 0 and cuda_path != cuda_path_default:
          utils.print_warning(
              "nvcc path != CUDA_PATH",
              "nvcc path: %s" % cuda_path_default,
              "CUDA_PATH: %s" % cuda_path,
          )
  
      if os.path.exists(cuda_path):
          _cuda_path = cuda_path
      elif cuda_path_default is not None:
          _cuda_path = cuda_path_default
      elif os.path.exists("/usr/local/cuda"):
          _cuda_path = "/usr/local/cuda"
      else:
          _cuda_path = None
  
      return _cuda_path
  
imports: import contextlib
  import os
  import re
  import shlex
  import shutil
  import subprocess
  import sys
  import tempfile
  from typing import List, Set
  import cupy_builder
  import cupy_builder.install_utils
  from cupy_builder import _environment
  from cupy_builder._context import Context
label_desc: Use image node_id 3 for calling a global function with example usage: get_cuda_path() and returns: _cuda_path, _cuda_path