Wp list pages – Exclude some models from wp_list_pages

I'm trying to do something similar to the issue in Pages of exclusion with some models of wp_list_pages, but the $ exclude variable does not seem to return the _wp_page_template value to then filter the relevant pages with the template guidance-note-template.php from the list. All the advice, greatly appreciated.

    & # 39; _wp_page_template & # 39 ;, & # 39; meta_value & # 39; => & # 39; guidance-note-template.php & # 39;

) as $ page) {
$ exclude[] = $ page-> post_id;
}

$ children = get_pages (array (<child_of> => $ post-> ID));
$ hasChild = (count ($ children)> 0);
$ page_id = ($ hasChild)? $ post-> ID: wp_get_post_parent_id ($ post-> ID);
wp_list_pages (array (
& # 39; title_li & # 39; => & # 39;
& # 39; child_of & # 39; => $ page_id,
& # 39; Exclude & # 39; => implode (",", $ exclude),
));
?>