class_docstr: Keep track of and clean up after modules created while building Bokeh
  Documents.
docstr: Args:
      document (Document): A Document to manage modules for
          A weak reference to the Document will be retained
docstr_tok: ["Args",":","document","(","Document",")",":","A","Document","to","manage","modules","for","A","weak","reference","to","the","Document","will","be","retained"]
code: def __init__(self, document: Document):
      """
  
      Args:
          document (Document): A Document to manage modules for
              A weak reference to the Document will be retained
  
      """
      self._document = weakref.ref(document)
      self._modules = []
  
file_path: bokeh/src/bokeh/document/modules.py
imports: from __future__ import annotations
  import logging
  import sys
  import weakref
  from types import ModuleType
  from typing import TYPE_CHECKING
label_desc: Use image node_id 1 to create a new DocumentModuleManager object  with example: obj = DocumentModuleManager(document)