def METHOD_NAME(
    hf_dataset_name: str = "OpenAssistant/oasst1",
    split: str = "train+validation",
) -> Iterable[ExportMessageTree]:
    dataset = load_dataset(hf_dataset_name, split=split)
    tree_dict: dict = None
    parents: list = None
    for row in dataset:
        convert_hf_message(row)
        if row["parent_id"] is None:
            if tree_dict:
                tree = read_oasst_obj(tree_dict)
                assert isinstance(tree, ExportMessageTree)
                yield tree
            tree_dict = {
                "message_tree_id": row["message_id"],
                "tree_state": row["tree_state"],
                "prompt": row,
            }
            parents = []
        else:
            while parents[-1]["message_id"] != row["parent_id"]:
                parents.pop()
            parent = parents[-1]
            if "replies" not in parent:
                parent["replies"] = []
            parent["replies"].append(row)
        row.pop("message_tree_id", None)
        row.pop("tree_state", None)
        parents.append(row)
    if tree_dict:
        tree = read_oasst_obj(tree_dict)
        assert isinstance(tree, ExportMessageTree)
        yield tree