    def _prep_message(self, key, msg):
        """
        Checks if message should be logged and returns the message reformatted
        to indicate how many previous messages were supressed.
        """
        count = self._check_key(key)
        if count == 0:
            # No previously suppressed, just log it as-is.
            return msg
        elif count > 0:
            return f"{msg} ({count} previous messages suppressed)"
        return None
Checks if message should be logged and returns the message reformatted
to indicate how many previous messages were supressed.
custom_components/bermuda/log_spam_less.py