code: def _getFirmwareVersion(self, device):
          
          cmd = self._COMMAND.get('get-fw-version')
          self._writeData(cmd, device)
  
          try:
              result = self._serial.read(size=1)
              result = int(result)
          except serial.SerialException as e:
              self._log and self._log.error("Error: %s", e, exc_info=True)
              raise e
          except ValueError as e:
              result = None
  
          return result
docs: Get the firmware version.
  
          :Parameters:
            device : `int`
              The device is the integer number of the hardware devices ID and
              is only used with the Pololu Protocol.
  
          :Returns:
            An integer indicating the version number.