<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def write(self):
 """Construct the response header. The return value is a list containing the whole response header, with each line as a list element. """


        slist = []
        slist.append('{}/{}.{} {} {}'.format(
                        self.protocol,
                        self.version[0],
                        self.version[1],
                        self.code,
                        status_messages[self.code]))
        slist.extend(self.write_headers())
        slist.append('\r\n')
        return slist