Tree problem: Add empty branches to list to match other list

Oh! And preferably no plug-ins, if possible!
I found a solution on this page using tree sloth which does exactly what I need but I’m trying to make the definition not require any plug-ins.