This would be better written as `':'.join(encoding.smart_unicode(part) for part in key_parts)`