parameters: (field)
return_statement: return _VALUE_CHECKERS[field.cpp_type]
docstring: Returns a type checker for a message field of the specified types.
  
    Args:
      field: FieldDescriptor object for this field.
  
    Returns:
      An instance of TypeChecker which can be used to verify the types
      of values assigned to a field of the specified type.
docstring_summary: Returns a type checker for a message field of the specified types.
docstring_tokens: Returns a type checker for a message field of the specified types .
function: def GetTypeChecker(field):
    """Returns a type checker for a message field of the specified types.
  
    Args:
      field: FieldDescriptor object for this field.
  
    Returns:
      An instance of TypeChecker which can be used to verify the types
      of values assigned to a field of the specified type.
    """
    if (field.cpp_type == _FieldDescriptor.CPPTYPE_STRING and
        field.type == _FieldDescriptor.TYPE_STRING):
      return UnicodeValueChecker()
    if field.cpp_type == _FieldDescriptor.CPPTYPE_ENUM:
      if SupportsOpenEnums(field):
        # When open enums are supported, any int32 can be assigned.
        return _VALUE_CHECKERS[_FieldDescriptor.CPPTYPE_INT32]
      else:
        return EnumValueChecker(field.enum_type)
    return _VALUE_CHECKERS[field.cpp_type]
function_tokens: def GetTypeChecker ( field ) : if ( field . cpp_type == _FieldDescriptor . CPPTYPE_STRING and field . type == _FieldDescriptor . TYPE_STRING ) : return UnicodeValueChecker ( ) if field . cpp_type == _FieldDescriptor . CPPTYPE_ENUM : if SupportsOpenEnums ( field ) : # When open enums are supported, any int32 can be assigned. return _VALUE_CHECKERS [ _FieldDescriptor . CPPTYPE_INT32 ] else : return EnumValueChecker ( field . enum_type ) return _VALUE_CHECKERS [ field . cpp_type ]