code: def testMessageTypesByName(self):
      file_type = unittest_pb2.DESCRIPTOR
      self.assertEqual(
          unittest_pb2._TESTALLTYPES,
          file_type.message_types_by_name[
              unittest_pb2._TESTALLTYPES.name
          ],
      )
  
      # Nested messages shouldn't be included in the message_types_by_name
      # dictionary (like in the C++ API).
      self.assertFalse(
          unittest_pb2._TESTALLTYPES_NESTEDMESSAGE.name
          in file_type.message_types_by_name
      )
  
imports: import unittest
  from google.protobuf.internal import test_bad_identifiers_pb2
  from google.protobuf import unittest_custom_options_pb2
  from google.protobuf import unittest_import_pb2
  from google.protobuf import unittest_import_public_pb2
  from google.protobuf import unittest_mset_pb2
  from google.protobuf import unittest_pb2
  from google.protobuf import unittest_no_generic_services_pb2
  from google.protobuf import service
label_desc: Use image node_id 17 for calling the GeneratorTest obj's underlying member method code with example usage: obj.testMessageTypesByName() without return types