code: def iframe_with_srcdoc(html_str, width="100%", height=500):
      if isinstance(width, str):
          width = f'"{width}"'
      srcdoc = html.escape(html_str)
  
      iframe = f"""
          <iframe
              width={width}
              height={height}
              frameborder="0"
              srcdoc="{srcdoc}"
          ></iframe>
      """
  
      from IPython.display import HTML  # noqa
  
      with warnings.catch_warnings():
          msg = "Consider using IPython.display.IFrame instead"
          warnings.filterwarnings("ignore", message=msg)
          return HTML(iframe)
  
file_path: deck.gl/bindings/pydeck/pydeck/io/html.py
imports: import html
  import os
  from os.path import realpath, join, dirname
  import sys
  import time
  import warnings
  import webbrowser
  import jinja2
  from ..frontend_semver import DECKGL_SEMVER
label_desc: Use image node_id 6 for calling a global function with example usage: iframe_with_srcdoc(html_str, width, height) and returns: HTML