Changed example for add_property() to use context managers.