code: def trace_dispatch(self, frame, event, arg):
          
          if hasattr(self, 'pdb'):
              return self.pdb.trace_dispatch(frame, event, arg)
          else:
              return Pdb.trace_dispatch(self, frame, event, arg)
docs: allow to switch to Pdb instance