def render_svg(self, render_id, words, arcs):
self.levels = self.get_levels(arcs)<EOL>self.highest_level = len(self.levels)<EOL>self.offset_y = self.distance / <NUM_LIT:2> * self.highest_level + self.arrow_stroke<EOL>self.width = self.offset_x + len(words) * self.distance<EOL>self.height = self.offset_y + <NUM_LIT:3> * self.word_spacing<EOL>self.id = render_id<EOL>words = [self.render_word(w["<STR_LIT:text>"], w["<STR_LIT>"], i) for i, w in enumerate(words)]<EOL>arcs = [<EOL>self.render_arrow(a["<STR_LIT:label>"], a["<STR_LIT:start>"], a["<STR_LIT:end>"], a["<STR_LIT>"], i)<EOL>for i, a in enumerate(arcs)<EOL>]<EOL>content = "<STR_LIT>".join(words) + "<STR_LIT>".join(arcs)<EOL>return TPL_DEP_SVG.format(<EOL>id=self.id,<EOL>width=self.width,<EOL>height=self.height,<EOL>color=self.color,<EOL>bg=self.bg,<EOL>font=self.font,<EOL>content=content,<EOL>dir=self.direction,<EOL>lang=self.lang,<EOL>)<EOL>
Render SVG.

        render_id (int): 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 (unicode): Rendered SVG markup.