code: def render_html(obj):
      from js import document
  
      if hasattr(sys.stdout, "_out"):
          target = sys.stdout._out  # type: ignore
      else:
          raise ValueError(
              "Could not determine target node to write to."
          )
      doc = Document()
      as_panel(obj).server_doc(doc, location=False)
      docs_json, [
          render_item,
      ] = standalone_docs_json_and_render_items(
          doc.roots, suppress_callback_warning=True
      )
      for root in doc.roots:
          render_item.roots._roots[root] = target
      document.getElementById(target).classList.add("bk-root")
      script = script_for_render_items(docs_json, [render_item])
      task = asyncio.create_task(_link(doc.roots[0].ref["id"], doc))
      _background_task.add(task)
      task.add_done_callback(_background_task.discard)
      return {"text/html": wrap_in_script_tag(script)}, {}
  
file_path: holoviews/holoviews/pyodide.py
imports: import asyncio
  import sys
  from bokeh.document import Document
  from bokeh.embed.elements import script_for_render_items
  from bokeh.embed.util import standalone_docs_json_and_render_items
  from bokeh.embed.wrappers import wrap_in_script_tag
  from panel.io.pyodide import _link_docs
  from panel.pane import panel
  from .core.dimension import LabelledData
  from .core.options import Store
  from .util import extension
label_desc: Use image node_id 1 for calling a global function with example usage: render_html(obj) and returns: dict,  dict