<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def save_mlf(mlf, output_filename):
 """Save an HTK Master Label File. :param mlf: MLF dictionary containing a mapping from file to list of annotations. :param output_filename: The file where to save the MLF """

    with codecs.open(output_filename, 'w', 'utf-8') as f:
        f.write(u'#!MLF!#\n')
        for k, v in mlf.items():
            f.write(u'"{}"\n'.format(k))
            for labels in v:
                for label in labels:
                    line = u'{start} {end} {symbol} ' \
                           u'{loglikelihood} {word}'.format(start=label.start or '',
                                                            end=label.end or '',
                                                            symbol=label.symbol or '',
                                                            loglikelihood=label.log_likelihood or '',
                                                            word=label.word or '')
                    f.write(u'{}\n'.format(line.strip()))

                f.write(u'.\n')