code: def _check_return(ret):
      if ret != 0:
          raise NvmlException(ret)
      return ret
  
imports: import threading
  from ctypes import CDLL, POINTER, Structure, byref, c_uint, c_ulonglong, create_string_buffer
label_desc: Use image node_id 1 for calling a global function with example usage: _check_return(ret) and returns: ret