code: def testUniqueClassForEachErrorCode(self):
      for error_code, exc_type in [
          (errors.CANCELLED, errors_impl.CancelledError),
          (errors.UNKNOWN, errors_impl.UnknownError),
          (errors.INVALID_ARGUMENT, errors_impl.InvalidArgumentError),
          (errors.DEADLINE_EXCEEDED, errors_impl.DeadlineExceededError),
          (errors.NOT_FOUND, errors_impl.NotFoundError),
          (errors.ALREADY_EXISTS, errors_impl.AlreadyExistsError),
          (errors.PERMISSION_DENIED, errors_impl.PermissionDeniedError),
          (errors.UNAUTHENTICATED, errors_impl.UnauthenticatedError),
          (
              errors.RESOURCE_EXHAUSTED,
              errors_impl.ResourceExhaustedError,
          ),
          (
              errors.FAILED_PRECONDITION,
              errors_impl.FailedPreconditionError,
          ),
          (errors.ABORTED, errors_impl.AbortedError),
          (errors.OUT_OF_RANGE, errors_impl.OutOfRangeError),
          (errors.UNIMPLEMENTED, errors_impl.UnimplementedError),
          (errors.INTERNAL, errors_impl.InternalError),
          (errors.UNAVAILABLE, errors_impl.UnavailableError),
          (errors.DATA_LOSS, errors_impl.DataLossError),
      ]:
          # pylint: disable=protected-access
          self.assertTrue(
              isinstance(
                  errors_impl._make_specific_exception(
                      None, None, None, error_code
                  ),
                  exc_type,
              )
          )
          # error_code_from_exception_type and exception_type_from_error_code should
          # be consistent with operation result.
          self.assertEqual(
              error_code,
              errors_impl.error_code_from_exception_type(exc_type),
          )
  
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 2 for calling the ErrorsTest obj's underlying member method code with example usage: obj.testUniqueClassForEachErrorCode() without return types