code: def _setSerialTimeout(self, timeout, device, message):
          
          timeout = min(self._timeoutKeys, key=lambda x: abs(x-timeout))
          value = self._timeoutToValue.get(timeout, 0)
          self._deviceConfig[device]['timeout'] = timeout
          return self._setConfig(self.SERIAL_TIMEOUT, value, device, message)
docs: Set the serial timeout on the hardware device.
  
          :Parameters:
            timeout : `float` or `int`
              The timeout value as defined by the hardware manual.
            device : `int`
              The device is the integer number of the hardware devices ID and
              is only used with the Pololu Protocol.
            message : `bool`
              If set to `True` a text message will be returned, if set to `False`
              the integer stored in the Qik will be returned.
  
          :Returns:
            Text message indicating the status of the shutdown error.