code: def nvmlDeviceGetAccountingMode(handle):
      r
      c_mode = _nvmlEnableState_t()
      fn = _nvmlGetFunctionPointer("nvmlDeviceGetAccountingMode")
      ret = fn(handle, byref(c_mode))
      _nvmlCheckReturn(ret)
      return bytes_to_str(c_mode.value)
docs: r"""
      /**
       * Queries the state of per process accounting mode.
       *
       * For Kepler &tm; or newer fully supported devices.
       *
       * See \ref nvmlDeviceGetAccountingStats for more details.
       * See \ref nvmlDeviceSetAccountingMode
       *
       * @param device                               The identifier of the target device
       * @param mode                                 Reference in which to return the current accounting mode
       *
       * @return
       *         - \ref NVML_SUCCESS                 if the mode has been successfully retrieved
       *         - \ref NVML_ERROR_UNINITIALIZED     if the library has not been successfully initialized
       *         - \ref NVML_ERROR_INVALID_ARGUMENT  if \a device is invalid or \a mode are NULL
       *         - \ref NVML_ERROR_NOT_SUPPORTED     if the device doesn't support this feature
       *         - \ref NVML_ERROR_UNKNOWN           on any unexpected error
       */
      nvmlReturn_t DECLDIR nvmlDeviceGetAccountingMode