<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def add_callback(self, name, callback, echo_old=False, priority=0):
 """ Add a callback that gets triggered when a callback property of the class changes. Parameters name : str The instance to add the callback to. callback : func The callback function to add echo_old : bool, optional If `True`, the callback function will be invoked with both the old and new values of the property, as ``callback(old, new)``. If `False` (the default), will be invoked as ``callback(new)`` priority : int, optional This can optionally be used to force a certain order of execution of callbacks (larger values indicate a higher priority). """

        if self.is_callback_property(name):
            prop = getattr(type(self), name)
            prop.add_callback(self, callback, echo_old=echo_old, priority=priority)
        else:
            raise TypeError("attribute '{0}' is not a callback property".format(name))