code: def determine_cuda_runtime_lib_path() -> Union[Path, None]:
      """
      Searches for a cuda installations, in the following order of priority:
          1. active conda env
          2. LD_LIBRARY_PATH
          3. any other env vars, while ignoring those that
              - are known to be unrelated (see `bnb.cuda_setup.env_vars.to_be_ignored`)
              - don't contain the path separator `/`
  
      If multiple libraries are found in part 3, we optimistically try one,
      while giving a warning message.
      """
      candidate_env_vars = (
          get_potentially_lib_path_containing_env_vars()
      )
  
      cuda_runtime_libs = set()
      if "CONDA_PREFIX" in candidate_env_vars:
          conda_libs_path = (
              Path(candidate_env_vars["CONDA_PREFIX"]) / "lib"
          )
  
          conda_cuda_libs = find_cuda_lib_in(str(conda_libs_path))
          warn_in_case_of_duplicates(conda_cuda_libs)
  
          if conda_cuda_libs:
              cuda_runtime_libs.update(conda_cuda_libs)
  
          CUDASetup.get_instance().add_log_entry(
              f'{candidate_env_vars["CONDA_PREFIX"]} did not contain '
              f"{CUDA_RUNTIME_LIBS} as expected! Searching further paths...",
              is_warning=True,
          )
  
      if "LD_LIBRARY_PATH" in candidate_env_vars:
          lib_ld_cuda_libs = find_cuda_lib_in(
              candidate_env_vars["LD_LIBRARY_PATH"]
          )
  
          if lib_ld_cuda_libs:
              cuda_runtime_libs.update(lib_ld_cuda_libs)
          warn_in_case_of_duplicates(lib_ld_cuda_libs)
  
          CUDASetup.get_instance().add_log_entry(
              f'{candidate_env_vars["LD_LIBRARY_PATH"]} did not contain '
              f"{CUDA_RUNTIME_LIBS} as expected! Searching further paths...",
              is_warning=True,
          )
  
      remaining_candidate_env_vars = {
          env_var: value
          for env_var, value in candidate_env_vars.items()
          if env_var not in {"CONDA_PREFIX", "LD_LIBRARY_PATH"}
      }
  
      cuda_runtime_libs = set()
      for env_var, value in remaining_candidate_env_vars.items():
          cuda_runtime_libs.update(find_cuda_lib_in(value))
  
      if len(cuda_runtime_libs) == 0:
          CUDASetup.get_instance().add_log_entry(
              "CUDA_SETUP: WARNING! libcudart.so not found in any environmental path. Searching in backup paths..."
          )
          cuda_runtime_libs.update(
              find_cuda_lib_in("/usr/local/cuda/lib64")
          )
  
      warn_in_case_of_duplicates(cuda_runtime_libs)
  
      cuda_setup = CUDASetup.get_instance()
      cuda_setup.add_log_entry(
          f"DEBUG: Possible options found for libcudart.so: {cuda_runtime_libs}"
      )
  
      return (
          next(iter(cuda_runtime_libs)) if cuda_runtime_libs else None
      )
  
imports: import ctypes
  import os
  import errno
  import torch
  from warnings import warn
  from itertools import product
  from pathlib import Path
  from typing import Set, Union
  from .env_vars import get_potentially_lib_path_containing_env_vars
label_desc: Use image node_id 8 for calling a global function with example usage: determine_cuda_runtime_lib_path() and returns: unknown