code: def property_observer(self, name):
          
          def wrapper(fun):
              self.observe_property(name, fun)
              fun.unobserve_mpv_properties = lambda: self.unobserve_property(name, fun)
              return fun
          return wrapper
docs: Function decorator to register a property observer. See ``MPV.observe_property`` for details.