One more thing, I also use this template quite a bit to return all children of a specific type since Tilix depends heavily on using Paned (i.e. splitters) and because of the way it works everything gets nested in multiple levels (Terminal within Paned within Paned within Paned).

https://github.com/gnunn1/tilix/blob/master/source/gx/gtk/util.d#L177