code: def test_err_set_raised(self):
      with self.assertRaises(ValueError):
          _testcapi.err_set_raised(ValueError())
      v = ValueError()
      try:
          _testcapi.err_set_raised(v)
      except ValueError as ex:
          self.assertIs(v, ex)
  
imports: import errno
  import os
  import re
  import sys
  import unittest
  from test import support
  from test.support import import_helper
  from test.support.os_helper import TESTFN, TESTFN_UNDECODABLE
  from test.support.script_helper import assert_python_failure
  from test.support.testcase import ExceptionIsLikeMixin
  from .test_misc import decode_stderr
label_desc: Use image node_id 1 for calling the Test_ErrSetAndRestore obj's underlying member method code with example usage: obj.test_err_set_raised() without return types