<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def static_message_event(self, sender, message):
 """Static message event handler - set message state based on event. Static message events will clear the message buffer before displaying themselves. :param sender: Unused - the object that sent the message. :type sender: Object, None :param message: A message to show in the viewer. :type message: safe.messaging.message.Message """


        self.static_message_count += 1

        if message == self.static_message:
            return
        # LOGGER.debug('Static message event %i' % self.static_message_count)
        _ = sender  # NOQA
        self.dynamic_messages = []
        self.static_message = message
        self.show_messages()