with_label function

Add a label attribute to an object