code: def _notify_change(self, model, attr, old, new, hint=None, setter=None, callback_invoker=None):
          ''' Called by Model when it changes
  
          '''
          # if name changes, update by-name index
          if attr == 'name':
              if old is not None:
                  self._all_models_by_name.remove_value(old, model)
              if new is not None:
                  self._all_models_by_name.add_value(new, model)
  
          if hint is None:
              serializable_new = model.lookup(attr).serializable_value(model)
          else:
              serializable_new = None
  
          event = ModelChangedEvent(self, model, attr, old, new, serializable_new, hint, setter, callback_invoker)
          self._trigger_on_change(eventf _notify_change(self, model, attr, old, new, hint=None, setter=None, callback_invoker=None):
          ''' Called by Model when it changes
  
          '''
          # if name changes, update by-name index
          if attr == 'name':
              if old is not None:
                  self._all_models_by_name.remove_value(old, model)
              if new is not None:
                  self._all_models_by_name.add_value(new, model)
  
          if hint is None:
              serializable_new = model.lookup(attr).serializable_value(model)
          else:
              serializable_new = None
  
          event = ModelChangedEvent(self, model, attr, old, new, serializable_new, hint, setter, callback_invoker)
          self._trigger_on_change(event)
docs: Called by Model when it changes