def format_src(self, linenos=True, colored=None, want=True,<EOL>offset_linenos=None, prefix=True):
formated_parts = list(self.format_parts(linenos=linenos,<EOL>colored=colored, want=want,<EOL>offset_linenos=offset_linenos,<EOL>prefix=prefix))<EOL>full_source = '<STR_LIT:\n>'.join(formated_parts)<EOL>return full_source<EOL>
Adds prefix and line numbers to a doctest

Args:
    linenos (bool): if True, adds line numbers to output

    colored (bool): if True highlight text with ansi colors. Default
        is specified in the config.

    want (bool): if True includes "want" lines (default False).

    offset_linenos (bool): if True offset line numbers to agree with
        their position in the source text file (default False).

    prefix (bool): if False, exclude the doctest `>>> ` prefix

Example:
    >>> from xdoctest.core import *
    >>> from xdoctest import core
    >>> testables = parse_doctestables(core.__file__)
    >>> self = next(testables)
    >>> self._parse()
    >>> print(self.format_src())
    >>> print(self.format_src(linenos=False, colored=False))
    >>> assert not self.is_disabled()