class_docstr: Checker used for enum fields.  Performs type-check and range check.
class_docstr_tok: ["Checker","used","for","enum","fields",".","Performs","type-check","and","range","check","."]
code: def CheckValue(self, proposed_value):
      if not isinstance(proposed_value, numbers.Integral):
          message = "%.1024r has type %s, but expected one of: %s" % (
              proposed_value,
              type(proposed_value),
              six.integer_types,
          )
          raise TypeError(message)
      if int(proposed_value) not in self._enum_type.values_by_number:
          raise ValueError("Unknown enum value: %d" % proposed_value)
      return proposed_value
  
imports: import numbers
  import six
  from google.protobuf.internal import api_implementation
  from google.protobuf.internal import decoder
  from google.protobuf.internal import encoder
  from google.protobuf.internal import wire_format
  from google.protobuf import descriptor
label_desc: Use image node_id 2 for calling the EnumValueChecker obj's underlying member method code with example usage: obj.CheckValue(proposed_value) and returns: proposed_value