code: def _cuda_path() -> str | None:
      _jaxlib_path = pathlib.Path(jaxlib.__file__).parent
      # If the pip package nvidia-cuda-nvcc-cu11 is installed, it should have
      # both of the things XLA looks for in the cuda path, namely bin/ptxas and
      # nvvm/libdevice/libdevice.10.bc
      path = _jaxlib_path.parent / "nvidia" / "cuda_nvcc"
      if path.is_dir():
          return str(path)
      # Failing that, we use the copy of libdevice.10.bc we include with jaxlib and
      # hope that the user has ptxas in their PATH.
      path = _jaxlib_path / "cuda"
      if path.is_dir():
          return str(path)
      return None
  
imports: from __future__ import annotations
  import gc
  import pathlib
  import re
  from typing import Any
  import jax.version
  from jax.version import _minimum_jaxlib_version
  import jaxlib.cpu_feature_guard
  import jaxlib.utils
  import jaxlib.xla_client
  import jaxlib.lapack
  import jaxlib.ducc_fft
  import jaxlib.gpu_solver
  import jaxlib.gpu_sparse
  import jaxlib.gpu_prng
  import jaxlib.gpu_linalg
  import jaxlib.hlo_helpers
  import jaxlib.gpu_rnn
  import jaxlib.gpu_triton
  import jaxlib.mosaic.python.tpu
label_desc: Use image node_id 3 for calling a global function with example usage: _cuda_path() and returns: None, str, str