code: def _sample_doc(self):
      doc = document.Document()
      another = AnotherModelInTestPatchDoc()
      doc.add_root(SomeModelInTestPatchDoc(child=another))
      doc.add_root(SomeModelInTestPatchDoc())
      doc.to_json()  # clear new model queue
      return doc
  
file_path: bokeh/tests/unit/bokeh/protocol/messages/test_patch_doc.py
imports: from __future__ import annotations
  import pytest
  import numpy
  import bokeh.document
  from bokeh.core.properties import Instance, Int, Nullable
  from bokeh.document.events import ColumnDataChangedEvent, ColumnsPatchedEvent, ColumnsStreamedEvent, ModelChangedEvent, RootAddedEvent, RootRemovedEvent
  from bokeh.model import Model
  from bokeh.models import ColumnDataSource
  from bokeh.protocol import Protocol
label_desc: Use image node_id 1 for calling the TestPatchDocument obj's underlying member method code with example usage: obj._sample_doc() and returns: doc