code: def set_model(self, model):
          
          if self.model:
              self.model.unregister_observer(self)
          self.model = model
          if self.model:
              self.model.register_observer(self)
              self.model_notification()
          else:
              self.set_widget(None)
          self.widget.set_sensitive(bool(self.model))
docs: *model* a `Model` instance, or None.