'Remove all content from the document but do not reset title.
Returns:
None'

def clear(self):

    self._push_all_models_freeze()
    try:
        while (len(self._roots) > 0):
            r = next(iter(self._roots))
            self.remove_root(r)
    finally:
        self._pop_all_models_freeze()
