class_docstr: Manage and provide access to all of the models that belong to a Bokeh
  Document.
  
  The set of "all models" means specifically all the models reachable from
  references form a Document's roots.
class_docstr_tok: ["Manage","and","provide","access","to","all","of","the","models","that","belong","to","a","Bokeh","Document",".","The","set","of","``","all","models","''","means","specifically","all","the","models","reachable","from","references","form","a","Document","'s","roots","."]
docstr: Clean up transient state of the document's models. 
docstr_tok: ["Clean","up","transient","state","of","the","document","'s","models","."]
code: def flush_synced(
      self, is_still_new: Callable[[Model], bool] | None = None
  ) -> None:
      """Clean up transient state of the document's models."""
      if is_still_new is None:
          self._new_models.clear()
      else:
          self._new_models = set(
              new_model
              for new_model in self._new_models
              if is_still_new(new_model)
          )
  
imports: from __future__ import annotations
  import logging
  import contextlib
  import weakref
  from typing import TYPE_CHECKING, Callable, Generator, Iterator
  from ..core.types import ID
  from ..model import Model
  from ..util.datatypes import MultiValuedDict
label_desc: Use image node_id 13 for calling the DocumentModelManager obj's underlying member method code with example usage: obj.flush_synced(is_still_new) without return types