There's the apoc.convert.toTree() procedure, that might be close to what you want. Here are a few threads on its usage:
apoc.convert.toTree()
and