docstr: Maps value to a proper subclass of NVMLError.
  See _extractNVMLErrorsAsClasses function for more details
docstr_tok: ["Maps","value","to","a","proper","subclass","of","NVMLError",".","See","_extractNVMLErrorsAsClasses","function","for","more","details"]
code: def __new__(typ, value):
      """
      Maps value to a proper subclass of NVMLError.
      See _extractNVMLErrorsAsClasses function for more details
      """
      if typ == NVMLError:
          typ = NVMLError._valClassMapping.get(value, typ)
      obj = Exception.__new__(typ)
      obj.value = value
      return obj
  
file_path: autogluon/common/src/autogluon/common/utils/nvutil.py
imports: import os
  import sys
  import threading
  from ctypes import *
label_desc: Use image node_id 1 for calling the NVMLError obj's underlying member method code with example usage: obj.__new__(typ, value) and returns: obj