def parse(self, string, info=None):
if DEBUG > <NUM_LIT:1>:<EOL><INDENT>print('<STR_LIT>')<EOL><DEDENT>if sys.version_info.major == <NUM_LIT:2>:  <EOL><INDENT>string = utils.ensure_unicode(string)<EOL><DEDENT>if not isinstance(string, six.string_types):<EOL><INDENT>raise TypeError('<STR_LIT>'.format(string))<EOL><DEDENT>string = string.expandtabs()<EOL>min_indent = min_indentation(string)<EOL>if min_indent > <NUM_LIT:0>:<EOL><INDENT>string = '<STR_LIT:\n>'.join([l[min_indent:] for l in string.splitlines()])<EOL><DEDENT>labeled_lines = None<EOL>grouped_lines = None<EOL>all_parts = None<EOL>try:<EOL><INDENT>labeled_lines = self._label_docsrc_lines(string)<EOL>grouped_lines = self._group_labeled_lines(labeled_lines)<EOL>all_parts = list(self._package_groups(grouped_lines))<EOL><DEDENT>except Exception as orig_ex:<EOL><INDENT>if labeled_lines is None:<EOL><INDENT>failpoint = '<STR_LIT>'<EOL><DEDENT>elif grouped_lines is None:<EOL><INDENT>failpoint = '<STR_LIT>'<EOL><DEDENT>elif all_parts is None:<EOL><INDENT>failpoint = '<STR_LIT>'<EOL><DEDENT>if DEBUG:<EOL><INDENT>print('<STR_LIT>')<EOL>print('<STR_LIT>')<EOL>print('<STR_LIT>'.format(failpoint))<EOL>import ubelt as ub<EOL>import traceback<EOL>tb_text = traceback.format_exc()<EOL>tb_text = ub.highlight_code(tb_text)<EOL>tb_text = ub.indent(tb_text)<EOL>print(tb_text)<EOL>print('<STR_LIT>')<EOL>print(string)<EOL>print('<STR_LIT>')<EOL>print('<STR_LIT>'.format(ub.repr2(info)))<EOL>print('<STR_LIT>')<EOL>print('<STR_LIT>'.format(orig_ex))<EOL>print('<STR_LIT>'.format(ub.repr2(labeled_lines)))<EOL>print('<STR_LIT>'.format(ub.repr2(grouped_lines, nl=<NUM_LIT:3>)))<EOL>print('<STR_LIT>'.format(ub.repr2(all_parts)))<EOL>print('<STR_LIT>')<EOL><DEDENT>raise exceptions.DoctestParseError(<EOL>'<STR_LIT>'.format(failpoint),<EOL>string=string, info=info, orig_ex=orig_ex)<EOL><DEDENT>if DEBUG > <NUM_LIT:1>:<EOL><INDENT>print('<STR_LIT>')<EOL><DEDENT>return all_parts<EOL>
Divide the given string into examples and interleaving text.

Args:
    string (str): string representing the doctest
    info (dict): info about where the string came from in case of an
        error

Returns:
    list : a list of `DoctestPart` objects

CommandLine:
    python -m xdoctest.parser DoctestParser.parse

Example:
    >>> s = 'I am a dummy example with two parts'
    >>> x = 10
    >>> print(s)
    I am a dummy example with two parts
    >>> s = 'My purpose it so demonstrate how wants work here'
    >>> print('The new want applies ONLY to stdout')
    >>> print('given before the last want')
    >>> '''
        this wont hurt the test at all
        even though its multiline '''
    >>> y = 20
    The new want applies ONLY to stdout
    given before the last want
    >>> # Parts from previous examples are executed in the same context
    >>> print(x + y)
    30

    this is simply text, and doesnt apply to the previous doctest the
    <BLANKLINE> directive is still in effect.

Example:
    >>> from xdoctest import parser
    >>> from xdoctest.docstr import docscrape_google
    >>> from xdoctest import core
    >>> self = parser.DoctestParser()
    >>> docstr = self.parse.__doc__
    >>> blocks = docscrape_google.split_google_docblocks(docstr)
    >>> doclineno = self.parse.__func__.__code__.co_firstlineno
    >>> key, (string, offset) = blocks[-2]
    >>> self._label_docsrc_lines(string)
    >>> doctest_parts = self.parse(string)
    >>> # each part with a want-string needs to be broken in two
    >>> assert len(doctest_parts) == 6