def METHOD_NAME(discussion: Dict, output_directory: pathlib.Path):
    # Create the filename for the top level file
    filename = title_to_filename(discussion.body.split("\n")[0])
    prefix = ["docs", "discussions", "alice_engineering_comms"]
    # prefix = ["docs", "tutorials", "alice"]
    text = discussion.body
    text = text.replace("\r", "")
    # path.write_text(text)
    # volume = current_volume(text)
    path = output_directory.joinpath(
        *[*prefix, "index.md"],
    )
    print(path, repr(text[:100] + "..."))
    if not path.parent.is_dir():
        path.parent.mkdir(parents=True)
    path.write_text(text)
    for i, comment in enumerate(discussion.comments):
        # Create the filename which will be joined by underscores
        filename_parts = prefix + [f"{i:04}"]
        # Output a file for the comment
        path = output_directory.joinpath(*filename_parts, "index.md")
        text = comment.body
        text = text.replace("\r", "")
        print(path, repr(text[:100] + "..."))
        if not path.parent.is_dir():
            path.parent.mkdir(parents=True)
        path.write_text(text)
        replys = []
        # Output a file for the reply
        for j, reply in enumerate(comment.replies):
            path = output_directory.joinpath(
                *[*filename_parts, "_".join(["reply", f"{j:04}"]) + ".md"],
            )
            text = reply.body
            text = text.replace("\r", "")
            replys += text
            print(path, repr(text[:100] + "..."))
            if not path.parent.is_dir():
                path.parent.mkdir(parents=True)
            path.write_text(text)