docs: def nvmlDeviceGetAccountingStats(handle, pid):
      r"""
      /**
       * Queries process's accounting stats.
       *
       * For Kepler &tm; or newer fully supported devices.
       *
       * Accounting stats capture GPU utilization and other statistics across the lifetime of a process.
       * Accounting stats can be queried during life time of the process and after its termination.
       * The time field in \ref nvmlAccountingStats_t is reported as 0 during the lifetime of the process and
       * updated to actual running time after its termination.
       * Accounting stats are kept in a circular buffer, newly created processes overwrite information about old
       * processes.
       *
       * See \ref nvmlAccountingStats_t for description of each returned metric.
       * List of processes that can be queried can be retrieved from \ref nvmlDeviceGetAccountingPids.
       *
       * @note Accounting Mode needs to be on. See \ref nvmlDeviceGetAccountingMode.
       * @note Only compute and graphics applications stats can be queried. Monitoring applications stats can't be
       *         queried since they don't contribute to GPU utilization.
       * @note In case of pid collision stats of only the latest process (that terminated last) will be reported
       *
       * @warning On Kepler devices per process statistics are accurate only if there's one process running on a GPU.
       *
       * @param device                               The identifier of the target device
       * @param pid                                  Process Id of the target process to query stats for
       * @param stats                                Reference in which to return the process's accounting stats
       *
       * @return
       *         - \ref NVML_SUCCESS                 if stats have 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 stats are NULL
       *         - \ref NVML_ERROR_NOT_FOUND         if process stats were not found
       *         - \ref NVML_ERROR_NOT_SUPPORTED     if the device doesn't support this feature or accounting mode is disabled
       *         - \ref NVML_ERROR_UNKNOWN           on any unexpected error
       *
       * @see nvmlDeviceGetAccountingBufferSize
       */
      nvmlReturn_t DECLDIR nvmlDeviceGetAccountingStats
      """
      stats = c_nvmlAccountingStats_t()
      fn = _nvmlGetFunctionPointer("nvmlDeviceGetAccountingStats")
      ret = fn(handle, c_uint(pid), byref(stats))
      _nvmlCheckReturn(ret)
      if (stats.maxMemoryUsage == NVML_VALUE_NOT_AVAILABLE_ulonglong.value):
          # special case for WDDM on Windows, see comment above
          stats.maxMemoryUsage = None
      return bytes_to_str(stats)