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: Args:
      document (Document): A Document to manage models for
          A weak reference to the Document will be retained
docstr_tok: ["Args",":","document","(","Document",")",":","A","Document","to","manage","models","for","A","weak","reference","to","the","Document","will","be","retained"]
code: def __init__(self, document: Document):
      """
  
      Args:
          document (Document): A Document to manage models for
              A weak reference to the Document will be retained
  
      """
      self._document = weakref.ref(document)
      self._freeze_count = 0
      self._models = {}
      self._models_by_name = MultiValuedDict()
      self._new_models = set()
      self._seen_model_ids = set()
  
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 1 to create a new DocumentModelManager object  with example: obj = DocumentModelManager(document)