code: def _nvml_check_error(result):
      global _nvmlErrorString
      if _nvmlErrorString is None:
          _nvmlErrorString = _nvml_lib.nvmlErrorString
          _nvmlErrorString.restype = c_char_p
  
      if result != NVML_SUCCESS:
          _error_str = _nvmlErrorString(result)
          raise NVMLAPIError(_error_str.decode(), 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 4 for calling a global function with example usage: _nvml_check_error(result) without return types