Current implementation of topology labels is repetitive and error-prone. Refactor implementation into common utility.