def METHOD_NAME(input_path, temp_path, output_path):
    with open(temp_path, "r") as temp_file, open(output_path, "w") as output_file:
        # take all the lines up to <dxl:Thread from the original input file
        if glob_header_to_thread is not None:
            output_file.write(glob_header_to_thread)
            temp_file_started = False
        else:
            temp_file_started = True
        # then take all the remaining lines from the temp file
        temp_file.seek(0)
        for temp_line in temp_file:
            if re.search(r'<dxl:Thread ', temp_line):
                temp_file_started = True
            if temp_file_started:
                output_file.write(temp_line)
        temp_file.close()
        output_file.close()