class_docstr: Proxy for DocTestCase: provides an address() method that
  returns the correct address for the doctest case. Otherwise
  acts as a proxy to the test case. To provide hints for address(),
  an obj may also be passed -- this will be used as the test object
  for purposes of determining the test address, if it is provided.
code: def tearDown(self):
      # Undo the test.globs reassignment we made, so that the parent class
      # teardown doesn't destroy the ipython namespace
      if isinstance(self._dt_test.examples[0], IPExample):
          self._dt_test.globs = self._dt_test_globs_ori
          _ip.user_ns.clear()
          _ip.user_ns.update(self.user_ns_orig)
  
      # XXX - fperez: I am not sure if this is truly a bug in nose 0.11, but
      # it does look like one to me: its tearDown method tries to run
      #
      # delattr(builtin_mod, self._result_var)
      #
      # without checking that the attribute really is there; it implicitly
      # assumes it should have been set via displayhook.  But if the
      # displayhook was never called, this doesn't necessarily happen.  I
      # haven't been able to find a little self-contained example outside of
      # ipython that would show the problem so I can report it to the nose
      # team, but it does happen a lot in our code.
      #
      # So here, we just protect as narrowly as possible by trapping an
      # attribute error whose message would be the name of self._result_var,
      # and letting any other error propagate.
      try:
          super(DocTestCase, self).tearDown()
      except AttributeError as exc:
          if exc.args[0] != self._result_var:
              raise
  
imports: import doctest
  import inspect
  import logging
  import os
  import re
  import sys
  from testpath import modified_env
  from inspect import getmodule
  from doctest import REPORTING_FLAGS, REPORT_ONLY_FIRST_FAILURE, _unittest_reportflags, DocTestRunner, _extract_future_flags, pdb, _OutputRedirectingPdb, _exception_traceback, linecache
  from nose.plugins import doctests, Plugin
  from nose.util import anyp, tolist
  from IPython.utils.py3compat import builtin_mod, PY3, getcwd
label_desc: Use image node_id 4 for calling the DocTestCase obj's underlying member method code with example usage: obj.tearDown() without return types