code: def _get_checker():
      """
      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):
          """
          Copied from doctest_nose_plugin.py from the nltk project:
              https://github.com/nltk/nltk
  
          Further extended to also support byte literals.
          """
  
          _unicode_literal_re = re.compile(
              r"(\W|^)[uU]([rR]?[\'\"])", re.UNICODE
          )
          _bytes_literal_re = re.compile(
              r"(\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:  # pragma: no cover
  
                  def remove_prefixes(regex, txt):
                      return re.sub(regex, r"\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()
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import inspect
  import platform
  import sys
  import traceback
  import warnings
  from contextlib import contextmanager
  import pytest
  from _pytest._code.code import ExceptionInfo
  from _pytest._code.code import ReprFileLocation
  from _pytest._code.code import TerminalRepr
  from _pytest.compat import safe_getattr
  from _pytest.fixtures import FixtureRequest
  from _pytest.outcomes import Skipped
  from _pytest.warning_types import PytestWarning
label_desc: Use image node_id 14 for calling a global function with example usage: _get_checker() and returns: _get_checker, _get_checker, True, False, res, re