How to display a nested list on the UI?

There is an add-on that I’m contributing to and I would to improve the UI. The add-on works with a two-level deep nested list (list>sublist>item), currently the add-on is using 2 UIlists, on the first one it show the sublists and when you select one of these their items are displayed on the second list. I think it will be better to display it in a single collapsible list, like the Outliner

if the outliner can do it the community add-ons should be able to do it too, the problem is the poor and outdated documentation for the developers.

Anyone knows how to use that UI Widget?