code: def testDifferentCustomOptionTypes(self):
      kint32min = -(2**31)
      kint64min = -(2**63)
      kint32max = 2**31 - 1
      kint64max = 2**63 - 1
      kuint32max = 2**32 - 1
      kuint64max = 2**64 - 1
  
      message_descriptor = (
          unittest_custom_options_pb2.CustomOptionMinIntegerValues.DESCRIPTOR
      )
      message_options = message_descriptor.GetOptions()
      self.assertEqual(
          False,
          message_options.Extensions[
              unittest_custom_options_pb2.bool_opt
          ],
      )
      self.assertEqual(
          kint32min,
          message_options.Extensions[
              unittest_custom_options_pb2.int32_opt
          ],
      )
      self.assertEqual(
          kint64min,
          message_options.Extensions[
              unittest_custom_options_pb2.int64_opt
          ],
      )
      self.assertEqual(
          0,
          message_options.Extensions[
              unittest_custom_options_pb2.uint32_opt
          ],
      )
      self.assertEqual(
          0,
          message_options.Extensions[
              unittest_custom_options_pb2.uint64_opt
          ],
      )
      self.assertEqual(
          kint32min,
          message_options.Extensions[
              unittest_custom_options_pb2.sint32_opt
          ],
      )
      self.assertEqual(
          kint64min,
          message_options.Extensions[
              unittest_custom_options_pb2.sint64_opt
          ],
      )
      self.assertEqual(
          0,
          message_options.Extensions[
              unittest_custom_options_pb2.fixed32_opt
          ],
      )
      self.assertEqual(
          0,
          message_options.Extensions[
              unittest_custom_options_pb2.fixed64_opt
          ],
      )
      self.assertEqual(
          kint32min,
          message_options.Extensions[
              unittest_custom_options_pb2.sfixed32_opt
          ],
      )
      self.assertEqual(
          kint64min,
          message_options.Extensions[
              unittest_custom_options_pb2.sfixed64_opt
          ],
      )
  
      message_descriptor = (
          unittest_custom_options_pb2.CustomOptionMaxIntegerValues.DESCRIPTOR
      )
      message_options = message_descriptor.GetOptions()
      self.assertEqual(
          True,
          message_options.Extensions[
              unittest_custom_options_pb2.bool_opt
          ],
      )
      self.assertEqual(
          kint32max,
          message_options.Extensions[
              unittest_custom_options_pb2.int32_opt
          ],
      )
      self.assertEqual(
          kint64max,
          message_options.Extensions[
              unittest_custom_options_pb2.int64_opt
          ],
      )
      self.assertEqual(
          kuint32max,
          message_options.Extensions[
              unittest_custom_options_pb2.uint32_opt
          ],
      )
      self.assertEqual(
          kuint64max,
          message_options.Extensions[
              unittest_custom_options_pb2.uint64_opt
          ],
      )
      self.assertEqual(
          kint32max,
          message_options.Extensions[
              unittest_custom_options_pb2.sint32_opt
          ],
      )
      self.assertEqual(
          kint64max,
          message_options.Extensions[
              unittest_custom_options_pb2.sint64_opt
          ],
      )
      self.assertEqual(
          kuint32max,
          message_options.Extensions[
              unittest_custom_options_pb2.fixed32_opt
          ],
      )
      self.assertEqual(
          kuint64max,
          message_options.Extensions[
              unittest_custom_options_pb2.fixed64_opt
          ],
      )
      self.assertEqual(
          kint32max,
          message_options.Extensions[
              unittest_custom_options_pb2.sfixed32_opt
          ],
      )
      self.assertEqual(
          kint64max,
          message_options.Extensions[
              unittest_custom_options_pb2.sfixed64_opt
          ],
      )
  
      message_descriptor = (
          unittest_custom_options_pb2.CustomOptionOtherValues.DESCRIPTOR
      )
      message_options = message_descriptor.GetOptions()
      self.assertEqual(
          -100,
          message_options.Extensions[
              unittest_custom_options_pb2.int32_opt
          ],
      )
      self.assertAlmostEqual(
          12.3456789,
          message_options.Extensions[
              unittest_custom_options_pb2.float_opt
          ],
          6,
      )
      self.assertAlmostEqual(
          1.234567890123456789,
          message_options.Extensions[
              unittest_custom_options_pb2.double_opt
          ],
      )
      self.assertEqual(
          'Hello, "World"',
          message_options.Extensions[
              unittest_custom_options_pb2.string_opt
          ],
      )
      self.assertEqual(
          b"Hello\0World",
          message_options.Extensions[
              unittest_custom_options_pb2.bytes_opt
          ],
      )
      dummy_enum = (
          unittest_custom_options_pb2.DummyMessageContainingEnum
      )
      self.assertEqual(
          dummy_enum.TEST_OPTION_ENUM_TYPE2,
          message_options.Extensions[
              unittest_custom_options_pb2.enum_opt
          ],
      )
  
      message_descriptor = (
          unittest_custom_options_pb2.SettingRealsFromPositiveInts.DESCRIPTOR
      )
      message_options = message_descriptor.GetOptions()
      self.assertAlmostEqual(
          12,
          message_options.Extensions[
              unittest_custom_options_pb2.float_opt
          ],
          6,
      )
      self.assertAlmostEqual(
          154,
          message_options.Extensions[
              unittest_custom_options_pb2.double_opt
          ],
      )
  
      message_descriptor = (
          unittest_custom_options_pb2.SettingRealsFromNegativeInts.DESCRIPTOR
      )
      message_options = message_descriptor.GetOptions()
      self.assertAlmostEqual(
          -12,
          message_options.Extensions[
              unittest_custom_options_pb2.float_opt
          ],
          6,
      )
      self.assertAlmostEqual(
          -154,
          message_options.Extensions[
              unittest_custom_options_pb2.double_opt
          ],
      )
  
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 9 for calling the DescriptorTest obj's underlying member method code with example usage: obj.testDifferentCustomOptionTypes() without return types