Python Dynamically Add Attribute To Block