<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _getPWMFrequency(self, device, message):
 """ Get the PWM frequency stored on the hardware device. :Parameters: 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: A text message or an int. See the `message` parameter above. """

        result = self._getConfig(self.PWM_PARAM, device)
        freq, msg = self._CONFIG_PWM.get(result, (result, 'Invalid Frequency'))

        if message:
            result = msg
        else:
            result = freq

        return result