docs: def nvmlDeviceGetHandleBySerial(serial):
      r"""
      /**
       * Acquire the handle for a particular device, based on its board serial number.
       *
       * For Fermi &tm; or newer fully supported devices.
       *
       * This number corresponds to the value printed directly on the board, and to the value returned by
       *   \ref nvmlDeviceGetSerial().
       *
       * @deprecated Since more than one GPU can exist on a single board this function is deprecated in favor
       *             of \ref nvmlDeviceGetHandleByUUID.
       *             For dual GPU boards this function will return NVML_ERROR_INVALID_ARGUMENT.
       *
       * Starting from NVML 5, this API causes NVML to initialize the target GPU
       * NVML may initialize additional GPUs as it searches for the target GPU
       *
       * @param serial                               The board serial number of the target GPU
       * @param device                               Reference in which to return the device handle
       *
       * @return
       *         - \ref NVML_SUCCESS                  if \a device has been set
       *         - \ref NVML_ERROR_UNINITIALIZED      if the library has not been successfully initialized
       *         - \ref NVML_ERROR_INVALID_ARGUMENT   if \a serial is invalid, \a device is NULL or more than one
       *                                              device has the same serial (dual GPU boards)
       *         - \ref NVML_ERROR_NOT_FOUND          if \a serial does not match a valid device on the system
       *         - \ref NVML_ERROR_INSUFFICIENT_POWER if any attached devices have improperly attached external power cables
       *         - \ref NVML_ERROR_IRQ_ISSUE          if NVIDIA kernel detected an interrupt issue with the attached GPUs
       *         - \ref NVML_ERROR_GPU_IS_LOST        if any GPU has fallen off the bus or is otherwise inaccessible
       *         - \ref NVML_ERROR_UNKNOWN            on any unexpected error
       *
       * @see nvmlDeviceGetSerial
       * @see nvmlDeviceGetHandleByUUID
       */
      nvmlReturn_t DECLDIR nvmlDeviceGetHandleBySerial
      """
      """
  /**
   * Acquire the handle for a particular device, based on its board serial number.
   *
   * For Fermi &tm; or newer fully supported devices.
   *
   * This number corresponds to the value printed directly on the board, and to the value returned by
   *   \ref nvmlDeviceGetSerial().
   *
   * @deprecated Since more than one GPU can exist on a single board this function is deprecated in favor
   *             of \ref nvmlDeviceGetHandleByUUID.
   *             For dual GPU boards this function will return NVML_ERROR_INVALID_ARGUMENT.
   *
   * Starting from NVML 5, this API causes NVML to initialize the target GPU
   * NVML may initialize additional GPUs as it searches for the target GPU
   *
   * @param serial                               The board serial number of the target GPU
   * @param device                               Reference in which to return the device handle
   *
   * @return
   *         - \ref NVML_SUCCESS                  if \a device has been set
   *         - \ref NVML_ERROR_UNINITIALIZED      if the library has not been successfully initialized
   *         - \ref NVML_ERROR_INVALID_ARGUMENT   if \a serial is invalid, \a device is NULL or more than one
   *                                              device has the same serial (dual GPU boards)
   *         - \ref NVML_ERROR_NOT_FOUND          if \a serial does not match a valid device on the system
   *         - \ref NVML_ERROR_INSUFFICIENT_POWER if any attached devices have improperly attached external power cables
   *         - \ref NVML_ERROR_IRQ_ISSUE          if NVIDIA kernel detected an interrupt issue with the attached GPUs
   *         - \ref NVML_ERROR_GPU_IS_LOST        if any GPU has fallen off the bus or is otherwise inaccessible
   *         - \ref NVML_ERROR_UNKNOWN            on any unexpected error
   *
   * @see nvmlDeviceGetSerial
   * @see nvmlDeviceGetHandleByUUID
   */
      """
      c_serial = c_char_p(serial)
      device = c_nvmlDevice_t()
      fn = _nvmlGetFunctionPointer("nvmlDeviceGetHandleBySerial")
      ret = fn(c_serial, byref(device))
      _nvmlCheckReturn(ret)
      return bytes_to_str(device)