I tend to do it right before the print statements -- simple maps may be easy to insert inline like above (never mind the yuck part), but many times it requires more complicated code. There is a lot to be said for readability and standardizing the order you do it in -- if you have to build it once ahead of time consider doing it every time so your code flows the same.