code: def testKnownErrorClassForEachErrorCodeInProto(self):
      for error_code in error_codes_pb2.Code.values():
          # pylint: disable=line-too-long
          if error_code in (
              error_codes_pb2.OK,
              error_codes_pb2.DO_NOT_USE_RESERVED_FOR_FUTURE_EXPANSION_USE_DEFAULT_IN_SWITCH_INSTEAD_,
          ):
              continue
          # pylint: enable=line-too-long
          with warnings.catch_warnings(record=True) as w:
              # pylint: disable=protected-access
              exc = errors_impl._make_specific_exception(
                  None, None, None, error_code
              )
              # pylint: enable=protected-access
          self.assertEqual(0, len(w))  # No warning is raised.
          self.assertTrue(isinstance(exc, errors_impl.OpError))
          self.assertTrue(
              errors_impl.OpError in exc.__class__.__bases__
          )
  
imports: import gc
  import pickle
  import warnings
  from tensorflow.core.lib.core import error_codes_pb2
  from tensorflow.python.framework import _errors_test_helper
  from tensorflow.python.framework import c_api_util
  from tensorflow.python.framework import errors
  from tensorflow.python.framework import errors_impl
  from tensorflow.python.lib.io import _pywrap_file_io
  from tensorflow.python.platform import test
  from tensorflow.python.util import compat
label_desc: Use image node_id 3 for calling the ErrorsTest obj's underlying member method code with example usage: obj.testKnownErrorClassForEachErrorCodeInProto() without return types