code: def export_svgs(
      obj: UIElement | Document,
      *,
      filename: str | None = None,
      width: int | None = None,
      height: int | None = None,
      webdriver: WebDriver | None = None,
      timeout: int = 5,
      state: State | None = None,
  ) -> list[str]:
      """Export the SVG-enabled plots within a layout. Each plot will result
      in a distinct SVG file.
  
      If the filename is not given, it is derived from the script name
      (e.g. ``/foo/myplot.py`` will create ``/foo/myplot.svg``)
  
      Args:
          obj (UIElement object) : a Layout (Row/Column), Plot or Widget object to display
  
          filename (str, optional) : filename to save document under (default: None)
              If None, infer from the filename.
  
          width (int) : the desired width of the exported layout obj only if
              it's a Plot instance. Otherwise the width kwarg is ignored.
  
          height (int) : the desired height of the exported layout obj only if
              it's a Plot instance. Otherwise the height kwarg is ignored.
  
          webdriver (selenium.webdriver) : a selenium webdriver instance to use
              to export the image.
  
          timeout (int) : the maximum amount of time (in seconds) to wait for
              Bokeh to initialize (default: 5) (Added in 1.1.1).
  
          state (State, optional) :
              A :class:`State` object. If None, then the current default
              implicit state is used. (default: None).
  
      Returns:
          filenames (list(str)) : the list of filenames where the SVGs files are saved.
  
      .. warning::
          Responsive sizing_modes may generate layouts with unexpected size and
          aspect ratios. It is recommended to use the default ``fixed`` sizing mode.
  
      """
      svgs = get_svgs(
          obj,
          width=width,
          height=height,
          driver=webdriver,
          timeout=timeout,
          state=state,
      )
  
      if len(svgs) == 0:
          log.warning("No SVG Plots were found.")
          return []
  
      return _write_collection(svgs, filename, "svg")
  
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 3 for calling a global function with example usage: export_svgs(obj) and returns: _write_collection, list