How to sort `modulestore().get_blocks()` items in order presented in CMS dashboard page

Does anyone know of a way to sort the results of modulestore().get_blocks() call to sort the block items in the same order as presented on the CMS course dashboard page?

This seems like a straight forward solution by traversing the children.

cc @dave