class_docstr: Render dependency parses as SVGs.
class_docstr_tok: ["Render","dependency","parses","as","SVGs","."]
docstr: Render SVG.
  
  render_id (Union[int, str]): Unique ID, typically index of document.
  words (list): Individual words and their tags.
  arcs (list): Individual arcs and their start, end, direction and label.
  RETURNS (str): Rendered SVG markup.
docstr_tok: ["Render","SVG",".","render_id","(","Union","[","int",",","str","]",")",":","Unique","ID",",","typically","index","of","document",".","words","(","list",")",":","Individual","words","and","their","tags",".","arcs","(","list",")",":","Individual","arcs","and","their","start",",","end",",","direction","and","label",".","RETURNS","(","str",")",":","Rendered","SVG","markup","."]
code: def render_svg(
      self,
      render_id: Union[int, str],
      words: List[Dict[str, Any]],
      arcs: List[Dict[str, Any]],
  ) -> str:
      """Render SVG.
  
      render_id (Union[int, str]): Unique ID, typically index of document.
      words (list): Individual words and their tags.
      arcs (list): Individual arcs and their start, end, direction and label.
      RETURNS (str): Rendered SVG markup.
      """
      self.levels = self.get_levels(arcs)
      self.highest_level = max(self.levels.values(), default=0)
      self.offset_y = (
          self.distance / 2 * self.highest_level + self.arrow_stroke
      )
      self.width = self.offset_x + len(words) * self.distance
      self.height = self.offset_y + 3 * self.word_spacing
      self.id = render_id
      words_svg = [
          self.render_word(w["text"], w["tag"], w.get("lemma", None), i)
          for i, w in enumerate(words)
      ]
      arcs_svg = [
          self.render_arrow(
              a["label"], a["start"], a["end"], a["dir"], i
          )
          for i, a in enumerate(arcs)
      ]
      content = "".join(words_svg) + "".join(arcs_svg)
      return TPL_DEP_SVG.format(
          id=self.id,
          width=self.width,
          height=self.height,
          color=self.color,
          bg=self.bg,
          font=self.font,
          content=content,
          dir=self.direction,
          lang=self.lang,
      )
  
imports: import uuid
  from typing import Any, Dict, List, Optional, Tuple, Union
  from ..errors import Errors
  from ..util import escape_html, minify_html, registry
  from .templates import TPL_DEP_ARCS, TPL_DEP_SVG, TPL_DEP_WORDS, TPL_DEP_WORDS_LEMMA, TPL_ENT, TPL_ENT_RTL, TPL_ENTS, TPL_FIGURE, TPL_KB_LINK, TPL_PAGE, TPL_SPAN, TPL_SPAN_RTL, TPL_SPAN_SLICE, TPL_SPAN_SLICE_RTL, TPL_SPAN_START, TPL_SPAN_START_RTL, TPL_SPANS, TPL_TITLE
label_desc: Use image node_id 3 for calling the DependencyRenderer obj's underlying member method code with example usage: obj.render_svg(render_id, words, arcs) and returns: TPL_DEP_SVG