code: def escape_indents(s: str) -> str:
      """
      Convert indent spaces & newlines to &nbsp; and <br>
  
      The goal of this function is to convert a few spaces as is required
      to preserve the formatting.
      """
      return s.replace(" " * 4, "&nbsp;" * 4).replace("\n", "<br>")
  
file_path: plotnine/doc/_renderers/format.py
imports: import re
  from functools import singledispatch
  import griffe.dataclasses
  import griffe.expressions
  from quartodoc.pandoc.components import Attr
  from quartodoc.pandoc.inlines import Span
label_desc: Use image node_id 2 for calling a global function with example usage: escape_indents(s) and returns: s