code: def testMergeMessageSet(self):
      message = unittest_pb2.TestAllTypes()
      text = "repeated_uint64: 1\n" "repeated_uint64: 2\n"
      text_format.Merge(text, message)
      self.assertEqual(1, message.repeated_uint64[0])
      self.assertEqual(2, message.repeated_uint64[1])
  
      message = unittest_mset_pb2.TestMessageSetContainer()
      text = (
          "message_set {\n"
          "  [protobuf_unittest.TestMessageSetExtension1] {\n"
          "    i: 23\n"
          "  }\n"
          "  [protobuf_unittest.TestMessageSetExtension2] {\n"
          '    str: "foo"\n'
          "  }\n"
          "}\n"
      )
      text_format.Merge(text, message)
      ext1 = (
          unittest_mset_pb2.TestMessageSetExtension1.message_set_extension
      )
      ext2 = (
          unittest_mset_pb2.TestMessageSetExtension2.message_set_extension
      )
      self.assertEquals(23, message.message_set.Extensions[ext1].i)
      self.assertEquals("foo", message.message_set.Extensions[ext2].str)
  
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 22 for calling the TextFormatTest obj's underlying member method code with example usage: obj.testMergeMessageSet() without return types