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.

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')