<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, output_file):
 """ Writes this MessageHeader to an output stream. Messages are written as a sequence of *<message_text-message_level>***=** *<message_text-text>* pairs separated by '\r\n'. The sequence is terminated by a pair of '\r\n' sequences. """

        for message_level, message_text in self:
            output_file.write('%s=%s\r\n' % (message_level, message_text))
        output_file.write('\r\n')