class_docstr: Tests for the properties of descriptors in generated code.
code: def CheckFieldDescriptor(self, field_descriptor):
      # Basic properties
      self.assertEqual(field_descriptor.name, "optional_int32")
      self.assertEqual(field_descriptor.camelcase_name, "optionalInt32")
      self.assertEqual(
          field_descriptor.full_name,
          "protobuf_unittest.TestAllTypes.optional_int32",
      )
      self.assertEqual(
          field_descriptor.containing_type.name, "TestAllTypes"
      )
      # Test equality and hashability
      self.assertEqual(field_descriptor, field_descriptor)
      self.assertEqual(
          field_descriptor.containing_type.fields_by_name[
              "optional_int32"
          ],
          field_descriptor,
      )
      self.assertEqual(
          field_descriptor.containing_type.fields_by_camelcase_name[
              "optionalInt32"
          ],
          field_descriptor,
      )
      self.assertIn(field_descriptor, [field_descriptor])
      self.assertIn(field_descriptor, {field_descriptor: None})
  
imports: import sys
  from google.protobuf import unittest_custom_options_pb2
  from google.protobuf import unittest_import_pb2
  from google.protobuf import unittest_pb2
  from google.protobuf import descriptor_pb2
  from google.protobuf.internal import api_implementation
  from google.protobuf.internal import test_util
  from google.protobuf import descriptor
  from google.protobuf import descriptor_pool
  from google.protobuf import symbol_database
  from google.protobuf import text_format
label_desc: Use image node_id 2 for calling the GeneratedDescriptorTest obj's underlying member method code with example usage: obj.CheckFieldDescriptor(field_descriptor) without return types