# it can get simpler if you want to print the formatted thing to a writer, like to stdout or to a file