code: def get_layout_html(
      obj: UIElement | Document,
      *,
      resources: Resources = INLINE,
      width: int | None = None,
      height: int | None = None,
      theme: Theme | None = None,
  ) -> str:
      """ """
      template = r"""\
      {% block preamble %}
      <style>
          html, body {
              box-sizing: border-box;
              width: 100%;
              height: 100%;
              margin: 0;
              border: 0;
              padding: 0;
              overflow: hidden;
          }
      </style>
      {% endblock %}
      """
  
      def html() -> str:
          return file_html(
              obj,
              resources=resources,
              title="",
              template=template,
              theme=theme,
              suppress_callback_warning=True,
              _always_new=True,
          )
  
      if width is not None or height is not None:
          # Defer this import, it is expensive
          from ..models.plots import Plot
  
          if not isinstance(obj, Plot):
              warn(
                  "Export method called with width or height argument on a non-Plot model. The size values will be ignored."
              )
          else:
              with _resized(obj, width, height):
                  return html()
  
      return html()
  
imports: from __future__ import annotations
  import logging
  import io
  import os
  from contextlib import contextmanager
  from os.path import abspath, expanduser, splitext
  from tempfile import mkstemp
  from typing import TYPE_CHECKING, Any, Iterator, cast
  from ..core.types import PathLike
  from ..document import Document
  from ..embed import file_html
  from ..resources import INLINE, Resources
  from ..themes import Theme
  from ..util.warnings import warn
  from .state import State, curstate
  from .util import default_filename
label_desc: Use image node_id 7 for calling a global function with example usage: get_layout_html(obj) and returns: html, file_html, html