code: def test_len(self) -> None:
      d = Document()
      dm = d.models
      assert len(dm) == 0
  
      r1 = Row(children=[Div()])
      r2 = Row(children=[Div(), Div()])
  
      d.add_root(r1)
      assert len(dm) == 2
  
      d.add_root(r2)
      assert len(dm) == 5
  
      d.remove_root(r1)
      assert len(dm) == 3
  
      d.remove_root(r2)
      assert len(dm) == 0
  
imports: from __future__ import annotations
  import pytest
  import gc
  from unittest.mock import MagicMock, patch
  from bokeh.core.has_props import Local
  from bokeh.core.properties import Instance, Nullable
  from bokeh.core.types import ID
  from bokeh.document import Document
  from bokeh.model import Model
  from bokeh.models import Div, Row
  import bokeh.document.models
label_desc: Use image node_id 2 for calling the TestDocumentModelManager obj's underlying member method code with example usage: obj.test_len() without return types