code: def _addexcinfo(self, rawexcinfo):
      # unwrap potential exception info (see twisted trial support below)
      rawexcinfo = getattr(rawexcinfo, "_rawexcinfo", rawexcinfo)
      try:
          excinfo = _pytest._code.ExceptionInfo(rawexcinfo)
          # invoke the attributes to trigger storing the traceback
          # trial causes some issue there
          excinfo.value
          excinfo.traceback
      except TypeError:
          try:
              try:
                  values = traceback.format_exception(*rawexcinfo)
                  values.insert(
                      0,
                      "NOTE: Incompatible Exception Representation, "
                      "displaying natively:\n\n",
                  )
                  fail("".join(values), pytrace=False)
              except (fail.Exception, KeyboardInterrupt):
                  raise
              except:  # noqa
                  fail(
                      "ERROR: Unknown Incompatible Exception "
                      "representation:\n%r" % (rawexcinfo,),
                      pytrace=False,
                  )
          except KeyboardInterrupt:
              raise
          except fail.Exception:
              excinfo = _pytest._code.ExceptionInfo.from_current()
      self.__dict__.setdefault("_excinfo", []).append(excinfo)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import sys
  import traceback
  import _pytest._code
  import pytest
  from _pytest.compat import getimfunc
  from _pytest.config import hookimpl
  from _pytest.outcomes import fail
  from _pytest.outcomes import skip
  from _pytest.outcomes import xfail
  from _pytest.python import Class
  from _pytest.python import Function
label_desc: Use image node_id 5 for calling the TestCaseFunction obj's underlying member method code with example usage: obj._addexcinfo(rawexcinfo) without return types