def METHOD_NAME(input_filename: str, output_filename: str, messages: List[Msg]) -> None:
    # Takes a list of changed messages and writes a copy of input file with updated message strings
    with open(input_filename, "r") as input_file, open(output_filename, "w") as output_file:
        iterator = iter(input_file.readlines())
        for line in iterator:
            output_file.write(line)
            if line.startswith("msgctxt"):
                #  Start of translation block
                msgctxt = line
                msgid = next(iterator)
                output_file.write(msgid)
                #  Check for updated version of msgstr
                message = list(filter(lambda m: m.msgctxt == msgctxt and m.msgid == msgid, messages))
                if message and message[0]:
                    #  Write update translation
                    output_file.write(message[0].msgstr)
                    # Skip lines until next translation. This should skip multiline msgstr
                    while True:
                        line = next(iterator)
                        if line == "\n":
                            output_file.write(line)
                            break