code: def test_func_adds_roots(self) -> None:
      def add_roots(doc: Document):
          doc.add_root(AnotherModelInTestFunction())
          doc.add_root(SomeModelInTestFunction())
  
      handler = bahf.FunctionHandler(add_roots)
      doc = Document()
      handler.modify_document(doc)
      if handler.failed:
          raise RuntimeError(handler.error)
      assert len(doc.roots) == 2
  
file_path: bokeh/tests/unit/bokeh/application/handlers/test_function.py
imports: from __future__ import annotations
  import pytest
  from bokeh.core.properties import Instance, Int, Nullable
  from bokeh.document import Document
  from bokeh.model import Model
  import bokeh.application.handlers.function
label_desc: Use image node_id 2 for calling the Test_FunctionHandler obj's underlying member method code with example usage: obj.test_func_adds_roots() without return types