def get_examples(self, string, name='<STR_LIT>'):
return [x for x in self.parse(string, name)<EOL>if isinstance(x, Example)]<EOL>
Extract all doctest examples from the given string, and return
them as a list of `Example` objects.  Line numbers are
0-based, because it's most common in doctests that nothing
interesting appears on the same line as opening triple-quote,
and so the first interesting line is called \"line 1\" then.

The optional argument `name` is a name identifying this
string, and is only used for error messages.