human
Complete this python program:
def _get_checker():
assistant
#Here is the Python program you requested.

    """Returns a doctest.OutputChecker subclass that takes in account the
    ALLOW_UNICODE option to ignore u\\ prefixes in strings and ALLOW_BYTES
    to strip b\\ prefixes.
    Useful when the same doctest should run in Python 2 and Python 3.
    An inner class is used to avoid importing "doctest" at the module
    level.
    """
    if hasattr(_get_checker, 'LiteralsOutputChecker'):
        return _get_checker.LiteralsOutputChecker()
    import doctest
    import re
    class LiteralsOutputChecker(doctest.OutputChecker, ):
        '\n                                Copied    from    doctest_nose_plugin.py    from    the    nltk    project:\n                                                https://github.com/nltk/nltk\n\n                                Further    extended    to    also    support    byte    literals.\n                                '
        _unicode_literal_re = re.compile('(\\W|^)[uU]([rR]?[\\\'\\"])', re.UNICODE)
        _bytes_literal_re = re.compile('(\\W|^)[bB]([rR]?[\\\'\\"])', re.UNICODE)
        def check_output(self, want, got, optionflags):
            res = doctest.OutputChecker.check_output(self, want, got, optionflags)
            if res:
                return True
            allow_unicode = (optionflags & _get_allow_unicode_flag())
            allow_bytes = (optionflags & _get_allow_bytes_flag())
            if ((not allow_unicode) and (not allow_bytes)):
                return False
            else:
                def remove_prefixes(regex, txt):
                    return re.sub(regex, '\\1\\2', txt)
                if allow_unicode:
                    want = remove_prefixes(self._unicode_literal_re, want)
                    got = remove_prefixes(self._unicode_literal_re, got)
                if allow_bytes:
                    want = remove_prefixes(self._bytes_literal_re, want)
                    got = remove_prefixes(self._bytes_literal_re, got)
                res = doctest.OutputChecker.check_output(self, want, got, optionflags)
                return res
    _get_checker.LiteralsOutputChecker = LiteralsOutputChecker
    return _get_checker.LiteralsOutputChecker()