Python Dynamic Add Attribute To Block