def METHOD_NAME(self, key, value, timestamp):
    """Save the timestamp of a heartbeat message.
    Additionally, keep track of the test case number.
    Also each heartbeat sets a new timeout, so when the device gets
    restarted by the watchdog, the communication will be restored
    by the __handshake_timer.
    """
    if self.drop_heartbeat_messages:
        return
    self.handshake_timer_cancel()
    case_num, timestamp_us = (int(i, base=16) for i in value.split(','))
    self.current_case = TestCaseData(case_num, CASE_DATA_INVALID)
    self.hb_timestamps_us.append(timestamp_us)
    self.handshake_timer_start(
        seconds=(MAX_HB_PERIOD + self.sync_delay),
        pre_sync_fun=self.heartbeat_timeout_handler)