'Remove a model as root model from this Document.
Changes to this model may still trigger ``on_change`` callbacks
on this document, if the model is still referred to by other
root models.
Args:
model (Model) :
The model to add as a root of this document.
setter (ClientSession or ServerSession or None, optional) :
This is used to prevent "boomerang" updates to Bokeh apps.
(default: None)
In the context of a Bokeh server application, incoming updates
to properties will be annotated with the session that is
doing the updating. This value is propagated through any
subsequent change notifications that the update triggers.
The session can compare the event setter to itself, and
suppress any updates that originate from itself.'

def remove_root(self, model, setter=None):

    from bokeh.server.events import RootRemovedEvent
    if (model not in self._roots):
        return
    self._push_all_models_freeze()
    try:
        self._roots.remove(model)
    finally:
        self._pop_all_models_freeze()
    self._trigger_on_change(RootRemovedEvent(self, model, setter))
