def METHOD_NAME(self):
    class SelfCheckExceptionHandling(Exception):
        pass
    caller_thread_id = threading.current_thread().ident
    @run_in_thread_with_timeout
    def my_errant_function(*_args, **_kwargs):
        if threading.current_thread().ident != caller_thread_id:
            raise SelfCheckExceptionHandling()
    # Suppress error output by redirecting to stringio_stderr
    stringio_stderr = pika.compat.StringIO()
    try:
        with mock.patch.object(_ThreadedTestWrapper, '_stderr',
                               stringio_stderr):
            with self.assertRaises(AssertionError) as exc_ctx:
                my_errant_function()
        self.assertIn('raise SelfCheckExceptionHandling()',
                      exc_ctx.exception.args[0])
        expected_tail = 'SelfCheckExceptionHandling\n'
        self.assertEqual(exc_ctx.exception.args[0][-len(expected_tail):],
                         expected_tail)
        self.assertIn('raise SelfCheckExceptionHandling()',
                      stringio_stderr.getvalue())
        self.assertEqual(stringio_stderr.getvalue()[-len(expected_tail):],
                         expected_tail)
    except Exception:
        try:
            print('This stderr was captured from our thread wrapper:\n',
                  stringio_stderr.getvalue(),
                  file=sys.stderr)
        except Exception:  # pylint: disable=W0703
            pass
        raise