code: def trigger(self, attr, old, new, hint=None, setter=None):
          ''' Trigger callbacks for ``attr`` on this object.
  
          Args:
              attr (str) :
              old (object) :
              new (object) :
  
          Returns:
              None
  
          '''
          def invoke():
              callbacks = self._callbacks.get(attr)
              if callbacks:
                  for callback in callbacks:
                      callback(attr, old, new)
          if hasattr(self, '_document') and self._document is not None:
              self._document._notify_change(self, attr, old, new, hint, setter, invoke)
          else:
              invoke(f trigger(self, attr, old, new, hint=None, setter=None):
          ''' Trigger callbacks for ``attr`` on this object.
  
          Args:
              attr (str) :
              old (object) :
              new (object) :
  
          Returns:
              None
  
          '''
          def invoke():
              callbacks = self._callbacks.get(attr)
              if callbacks:
                  for callback in callbacks:
                      callback(attr, old, new)
          if hasattr(self, '_document') and self._document is not None:
              self._document._notify_change(self, attr, old, new, hint, setter, invoke)
          else:
              invoke()
docs: Trigger callbacks for ``attr`` on this object.
  
          Args:
              attr (str) :
              old (object) :
              new (object) :
  
          Returns:
              None