add utility method from extracting module_idents from trees