code: def testMergeBadEnumValue(self):
      message = unittest_pb2.TestAllTypes()
      text = "optional_nested_enum: BARR"
      self.assertRaisesWithMessage(
          text_format.ParseError,
          (
              '1:23 : Enum type "protobuf_unittest.TestAllTypes.NestedEnum" '
              "has no value named BARR."
          ),
          text_format.Merge,
          text,
          message,
      )
  
      message = unittest_pb2.TestAllTypes()
      text = "optional_nested_enum: 100"
      self.assertRaisesWithMessage(
          text_format.ParseError,
          (
              '1:23 : Enum type "protobuf_unittest.TestAllTypes.NestedEnum" '
              "has no value with number 100."
          ),
          text_format.Merge,
          text,
          message,
      )
  
imports: import difflib
  import re
  import unittest
  from google.protobuf import text_format
  from google.protobuf.internal import test_util
  from google.protobuf import unittest_pb2
  from google.protobuf import unittest_mset_pb2
label_desc: Use image node_id 31 for calling the TextFormatTest obj's underlying member method code with example usage: obj.testMergeBadEnumValue() without return types