code: def mute(model: Model):
      
      if not isinstance(model, Model):
          raise TypeError("Expected a Model, not %r." % model)
      restore = model.__dict__.get("_notify_model_views")
      model._notify_model_views = lambda e: None
      try:
          yield
      finally:
          if restore is None:
              del model._notify_model_views
          else:
              model._notify_model_views = restore
docs: Block a model's views from being notified.
  
      All changes within a "mute" context will be blocked. No content is yielded to the
      user as in :func:`hold`, and the views of the model are never notified that changes
      took place.
  
      Parameters:
          mode: The model whose change events will be blocked.
  
      Examples:
  
          The view is never called due to the :func:`mute` context:
  
          .. code-block:: python
  
              from spectate import mvc
  
              l = mvc.List()
  
              @mvc.view(l)
              def raises(events):
                  raise ValueError("Events occured!")
  
              with mvc.mute(l):
                  l.append(1)