Abstract out the code to create a printable version of the
process/thread IDs.