class_docstr: Pseudo PDB that defers to the real pdb. 
class_docstr_tok: ["Pseudo","PDB","that","defers","to","the","real","pdb","."]
code: def _import_pdb_cls(cls, capman):
      if not cls._config:
          # Happens when using pytest.set_trace outside of a test.
          return pdb.Pdb
  
      usepdb_cls = cls._config.getvalue("usepdb_cls")
  
      if cls._wrapped_pdb_cls and cls._wrapped_pdb_cls[0] == usepdb_cls:
          return cls._wrapped_pdb_cls[1]
  
      if usepdb_cls:
          modname, classname = usepdb_cls
  
          try:
              __import__(modname)
              mod = sys.modules[modname]
  
              # Handle --pdbcls=pdb:pdb.Pdb (useful e.g. with pdbpp).
              parts = classname.split(".")
              pdb_cls = getattr(mod, parts[0])
              for part in parts[1:]:
                  pdb_cls = getattr(pdb_cls, part)
          except Exception as exc:
              value = ":".join((modname, classname))
              raise UsageError(
                  "--pdbcls: could not import {!r}: {}".format(
                      value, exc
                  )
              )
      else:
          pdb_cls = pdb.Pdb
  
      wrapped_cls = cls._get_pdb_wrapper_class(pdb_cls, capman)
      cls._wrapped_pdb_cls = (usepdb_cls, wrapped_cls)
      return wrapped_cls
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import os
  import argparse
  import pdb
  import sys
  from doctest import UnexpectedException
  from _pytest import outcomes
  from _pytest.config import hookimpl
  from _pytest.config.exceptions import UsageError
label_desc: Use image node_id 2 for calling the pytestPDB obj's underlying member method code with example usage: obj._import_pdb_cls(cls, capman) and returns: wrapped_cls, pdb, cls