docs: def nvmlDeviceGetMemoryErrorCounter(handle, errorType, counterType, locationType):
      r"""
      /**
       * Retrieves the requested memory error counter for the device.
       *
       * For Fermi &tm; or newer fully supported devices.
       * Requires \a NVML_INFOROM_ECC version 2.0 or higher to report aggregate location-based memory error counts.
       * Requires \a NVML_INFOROM_ECC version 1.0 or higher to report all other memory error counts.
       *
       * Only applicable to devices with ECC.
       *
       * Requires ECC Mode to be enabled.
       *
       * See \ref nvmlMemoryErrorType_t for a description of available memory error types.\n
       * See \ref nvmlEccCounterType_t for a description of available counter types.\n
       * See \ref nvmlMemoryLocation_t for a description of available counter locations.\n
       *
       * @param device                               The identifier of the target device
       * @param errorType                            Flag that specifies the type of error.
       * @param counterType                          Flag that specifies the counter-type of the errors.
       * @param locationType                         Specifies the location of the counter.
       * @param count                                Reference in which to return the ECC counter
       *
       * @return
       *         - \ref NVML_SUCCESS                 if \a count has been populated
       *         - \ref NVML_ERROR_UNINITIALIZED     if the library has not been successfully initialized
       *         - \ref NVML_ERROR_INVALID_ARGUMENT  if \a device, \a bitTyp,e \a counterType or \a locationType is
       *                                             invalid, or \a count is NULL
       *         - \ref NVML_ERROR_NOT_SUPPORTED     if the device does not support ECC error reporting in the specified memory
       *         - \ref NVML_ERROR_GPU_IS_LOST       if the target GPU has fallen off the bus or is otherwise inaccessible
       *         - \ref NVML_ERROR_UNKNOWN           on any unexpected error
       */
      nvmlReturn_t DECLDIR nvmlDeviceGetMemoryErrorCounter
      """
      c_count = c_ulonglong()
      fn = _nvmlGetFunctionPointer("nvmlDeviceGetMemoryErrorCounter")
      ret = fn(handle,
               _nvmlMemoryErrorType_t(errorType),
               _nvmlEccCounterType_t(counterType),
               _nvmlMemoryLocation_t(locationType),
               byref(c_count))
      _nvmlCheckReturn(ret)
      return bytes_to_str(c_count.value)