code: def _render_text(self, text, preformatted=False):
      
      tag = 'pre' if preformatted else 'div'
      self._segments.append('<%s>%s</%s>' % (tag, HtmlBuilder._format(text), tag))
docs: Renders an HTML formatted text block with the specified text.
  
      Args:
        text: the text to render
        preformatted: whether the text should be rendered as preformatted