code: def test_add(self) -> None:
      d = Document()
      dm = bdm.DocumentModuleManager(d)
  
      mod = FakeMod()
      assert "FakeMod" not in sys.modules
  
      dm.add(mod)
  
      assert "FakeMod" in sys.modules
      assert len(dm) == 1
  
      del sys.modules["FakeMod"]
  
file_path: bokeh/tests/unit/bokeh/document/test_modules.py
imports: from __future__ import annotations
  import pytest
  import gc
  import logging
  import sys
  from bokeh.document import Document
  from bokeh.util.logconfig import basicConfig
  import bokeh.document.modules
label_desc: Use image node_id 2 for calling the TestDocumentModuleManager obj's underlying member method code with example usage: obj.test_add() without return types