code: def testEnums(self):
      # We test only module-level enums here.
      # TODO(robinson): Examine descriptors directly to check
      # enum descriptor output.
      self.assertEqual(4, unittest_pb2.FOREIGN_FOO)
      self.assertEqual(5, unittest_pb2.FOREIGN_BAR)
      self.assertEqual(6, unittest_pb2.FOREIGN_BAZ)
  
      proto = unittest_pb2.TestAllTypes()
      self.assertEqual(1, proto.FOO)
      self.assertEqual(1, unittest_pb2.TestAllTypes.FOO)
      self.assertEqual(2, proto.BAR)
      self.assertEqual(2, unittest_pb2.TestAllTypes.BAR)
      self.assertEqual(3, proto.BAZ)
      self.assertEqual(3, unittest_pb2.TestAllTypes.BAZ)
  
imports: 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_mset_wire_format_pb2
  from google.protobuf import unittest_no_generic_services_pb2
  from google.protobuf import unittest_pb2
  from google.protobuf import service
  from google.protobuf import symbol_database
label_desc: Use image node_id 2 for calling the GeneratorTest obj's underlying member method code with example usage: obj.testEnums() without return types