class_docstr: Render dependency parses as SVGs.
class_docstr_tok: ["Render","dependency","parses","as","SVGs","."]
docstr: Render individual arrow.
  
  label (str): Dependency label.
  start (int): Index of start word.
  end (int): Index of end word.
  direction (str): Arrow direction, 'left' or 'right'.
  i (int): Unique ID, typically arrow index.
  RETURNS (str): Rendered SVG markup.
docstr_tok: ["Render","individual","arrow",".","label","(","str",")",":","Dependency","label",".","start","(","int",")",":","Index","of","start","word",".","end","(","int",")",":","Index","of","end","word",".","direction","(","str",")",":","Arrow","direction",",","'left","'","or","'right","'",".","i","(","int",")",":","Unique","ID",",","typically","arrow","index",".","RETURNS","(","str",")",":","Rendered","SVG","markup","."]
code: def render_arrow(
      self, label: str, start: int, end: int, direction: str, i: int
  ) -> str:
      """Render individual arrow.
  
      label (str): Dependency label.
      start (int): Index of start word.
      end (int): Index of end word.
      direction (str): Arrow direction, 'left' or 'right'.
      i (int): Unique ID, typically arrow index.
      RETURNS (str): Rendered SVG markup.
      """
      if start < 0 or end < 0:
          error_args = dict(
              start=start, end=end, label=label, dir=direction
          )
          raise ValueError(Errors.E157.format(**error_args))
      level = self.levels[(start, end, label)]
      x_start = (
          self.offset_x + start * self.distance + self.arrow_spacing
      )
      if self.direction == "rtl":
          x_start = self.width - x_start
      y = self.offset_y
      x_end = (
          self.offset_x
          + (end - start) * self.distance
          + start * self.distance
          - self.arrow_spacing * (self.highest_level - level) / 4
      )
      if self.direction == "rtl":
          x_end = self.width - x_end
      y_curve = self.offset_y - level * self.distance / 2
      if self.compact:
          y_curve = self.offset_y - level * self.distance / 6
      if y_curve == 0 and max(self.levels.values(), default=0) > 5:
          y_curve = -self.distance
      arrowhead = self.get_arrowhead(direction, x_start, y, x_end)
      arc = self.get_arc(x_start, y, y_curve, x_end)
      label_side = "right" if self.direction == "rtl" else "left"
      return TPL_DEP_ARCS.format(
          id=self.id,
          i=i,
          stroke=self.arrow_stroke,
          head=arrowhead,
          label=label,
          label_side=label_side,
          arc=arc,
      )
  
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 5 for calling the DependencyRenderer obj's underlying member method code with example usage: obj.render_arrow(label, start, end, direction, i) and returns: TPL_DEP_ARCS