<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def text(value: str, preformatted: bool = False):
 """ Adds text to the display. If the text is not preformatted, it will be displayed in paragraph format. Preformatted text will be displayed inside a pre tag with a monospace font. :param value: The text to display. :param preformatted: Whether or not to preserve the whitespace display of the text. """

    if preformatted:
        result = render_texts.preformatted_text(value)
    else:
        result = render_texts.text(value)
    r = _get_report()
    r.append_body(result)
    r.stdout_interceptor.write_source(
        '{}\n'.format(textwrap.dedent(value))
    )