The structa.format module contains various simple routines for “nicely” formatting certain structures for output.
structa.format