code: def _cu_check_error(result):
      if result != CUDA_SUCCESS:
          _error_str = c_char_p()
          _cuda_lib.cuGetErrorString(result, byref(_error_str))
          err_value = (
              _error_str.value.decode()
              if _error_str.value is not None
              else None
          )
          raise NVDeviceAPIError(err_value, errno=result)
  
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 3 for calling a global function with example usage: _cu_check_error(result) without return types