<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def update_status(self, header, message):
 """Process incoming status message. Acquire lock for status dictionary before updating."""

        with self._lock:
            if self.message_box:
                self.message_box.erase()
                self.message_box.move(0, 0)
                for n, field in enumerate(header):
                    if n == 0:
                        self.message_box.addstr(field + ":", curses.color_pair(1))
                    else:
                        self.message_box.addstr(
                            ", " + field + ":", curses.color_pair(1)
                        )
                    self.message_box.addstr(header[field])
                self.message_box.addstr(": ", curses.color_pair(1))
                self.message_box.addstr(
                    str(message), curses.color_pair(2) + curses.A_BOLD
                )
                self.message_box.refresh()
            if (
                message["host"] not in self._node_status
                or int(header["timestamp"])
                >= self._node_status[message["host"]]["last_seen"]
            ):
                self._node_status[message["host"]] = message
                self._node_status[message["host"]]["last_seen"] = int(
                    header["timestamp"]
                )