code: def wrapper_to_html(wrapper) -> ET.Element:
      div = ET.Element(
          "div", attrib={"class": "river-component river-wrapper"}
      )
  
      details = ET.Element("details", attrib={"class": "river-details"})
      div.append(details)
  
      summary = ET.Element("summary", attrib={"class": "river-summary"})
      details.append(summary)
  
      pre = ET.Element("pre", attrib={"class": "river-estimator-name"})
      pre.text = str(wrapper.__class__.__name__)
      summary.append(pre)
  
      code = ET.Element(
          "code", attrib={"class": "river-estimator-params"}
      )
      code.text = f"{repr(wrapper)}\n"
      details.append(code)
  
      div.append(to_html(wrapper._wrapped_model))
  
      return div
  
file_path: river/river/base/viz.py
imports: from __future__ import annotations
  import inspect
  import textwrap
  from xml.etree import ElementTree
label_desc: Use image node_id 5 for calling a global function with example usage: wrapper_to_html(wrapper) and returns: div