let path_to_par_node (path : t_path) : t_path =
let rec aux (rev_path : t_path) (acc : t_path) : t_path =
match rev_path with
|[] -> acc
|hd::tl ->
match hd with
|PAR_NODE _ -> hd::acc
|_ -> aux tl (hd::acc)
in aux (List.rev path) []