code: def _init_cp():
      global _cuda_lib, _no_device_warned
      if _init_pid == os.getpid():
          return
  
      libcuda_paths = [
          "libcuda.so",
          "libcuda.dylib",
          "cuda.dll",
          "nvcuda.dll",
      ]
      if _is_wsl:
          libcuda_paths = [
              "/usr/lib/wsl/lib/libcuda.so"
          ] + libcuda_paths
      _cuda_lib = _load_nv_library(*libcuda_paths)
  
      if _cuda_lib is None:
          return
      try:
          _cu_check_error(_cuda_lib.cuInit(0))
      except NVDeviceAPIError as ex:
          if ex.errno == CU_NO_CUDA_CAPABLE_DEVICE_DETECTED:
              _cuda_lib = None
              if not _no_device_warned:
                  logger.warning("No CUDA device detected")
                  _no_device_warned = True
          else:
              logger.exception("Failed to initialize libcuda.")
          return
  
imports: import dataclasses
  import logging
  import os
  import subprocess
  import sys
  import uuid
  from collections import namedtuple
  from ctypes import c_char, c_char_p, c_int, c_uint, c_ulonglong, byref, create_string_buffer, Structure, POINTER, CDLL
  from typing import List, Tuple, Optional, Union
  from ..utils import parse_readable_size
label_desc: Use image node_id 6 for calling a global function with example usage: _init_cp() without return types