'Extract all doctest examples from the given string, and
collect them into a `DocTest` object.
`globs`, `name`, `filename`, and `lineno` are attributes for
the new `DocTest` object.  See the documentation for `DocTest`
for more information.'

def get_doctest(self, string, globs, name, filename, lineno):

    return DocTest(self.get_examples(string, name), globs, name, filename, lineno, string)
