code: def testMergeBadExtension(self):
      message = unittest_pb2.TestAllExtensions()
      text = "[unknown_extension]: 8\n"
      self.assertRaisesWithMessage(
          text_format.ParseError,
          '1:2 : Extension "unknown_extension" not registered.',
          text_format.Merge,
          text,
          message,
      )
      message = unittest_pb2.TestAllTypes()
      self.assertRaisesWithMessage(
          text_format.ParseError,
          (
              '1:2 : Message type "protobuf_unittest.TestAllTypes" does not have '
              "extensions."
          ),
          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 28 for calling the TextFormatTest obj's underlying member method code with example usage: obj.testMergeBadExtension() without return types