<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def set_headline(self, level, message, timestamp=None, now_reference=None):
 """Set the persistent headline message for this service. Args: level (int):
 The level of the message (info, warning, error) message (string):
 The message contents timestamp (float):
 An optional monotonic value in seconds for when the message was created now_reference (float):
 If timestamp is not relative to monotonic() as called from this module then this should be now() as seen by whoever created the timestamp. """


        if self.headline is not None and self.headline.message == message:
            self.headline.created = monotonic()
            self.headline.count += 1
            return

        msg_object = ServiceMessage(level, message, self._last_message_id, timestamp, now_reference)
        self.headline = msg_object
        self._last_message_id += 1