<s> """<STR_LIT>""" <EOL> __author__ = '<STR_LIT>' <EOL> import copyreg <EOL> import operator <EOL> from google . protobuf . internal import _net_proto2___python <EOL> from google . protobuf . internal import enum_type_wrapper <EOL> from google . protobuf import message <EOL> import collections <EOL> _LABEL_REPEATED = _net_proto2___python . LABEL_REPEATED <EOL> _LABEL_OPTIONAL = _net_proto2___python . LABEL_OPTIONAL <EOL> _CPPTYPE_MESSAGE = _net_proto2___python . CPPTYPE_MESSAGE <EOL> _TYPE_MESSAGE = _net_proto2___python . TYPE_MESSAGE <EOL> def GetDescriptorPool ( ) : <EOL> """<STR_LIT>""" <EOL> return _net_proto2___python . NewCDescriptorPool ( ) <EOL> _pool = GetDescriptorPool ( ) <EOL> def GetFieldDescriptor ( full_field_name ) : <EOL> """<STR_LIT>""" <EOL> return _pool . FindFieldByName ( full_field_name ) <EOL> def BuildFile ( content ) : <EOL> """<STR_LIT>""" <EOL> _net_proto2___python . BuildFile ( content ) <EOL> def GetExtensionDescriptor ( full_extension_name ) : <EOL> """<STR_LIT>""" <EOL> return _pool . FindExtensionByName ( full_extension_name ) <EOL> def NewCMessage ( full_message_name ) : <EOL> """<STR_LIT>""" <EOL> return _net_proto2___python . NewCMessage ( full_message_name ) <EOL> def ScalarProperty ( cdescriptor ) : <EOL> """<STR_LIT>""" <EOL> def Getter ( self ) : <EOL> return self . _cmsg . GetScalar ( cdescriptor ) <EOL> def Setter ( self , value ) : <EOL> self . _cmsg . SetScalar ( cdescriptor , value ) <EOL> return property ( Getter , Setter ) <EOL> def CompositeProperty ( cdescriptor , message_type ) : <EOL> """<STR_LIT>""" <EOL> def Getter ( self ) : <EOL> sub_message = self . _composite_fields . get ( cdescriptor . name , None ) <EOL> if sub_message is None : <EOL> cmessage = self . _cmsg . NewSubMessage ( cdescriptor ) <EOL> sub_message = message_type . _concrete_class ( __cmessage = cmessage ) <EOL> self . _composite_fields [ cdescriptor . name ] = sub_message <EOL> return sub_message <EOL> return property ( Getter ) <EOL> class RepeatedScalarContainer ( object ) : <EOL> """<STR_LIT>""" <EOL> __slots__ = [ '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ] <EOL> def __init__ ( self , msg , cfield_descriptor ) : <EOL> self . _message = msg <EOL> self . _cmsg = msg . _cmsg <EOL> self . _cfield_descriptor = cfield_descriptor <EOL> def append ( self , value ) : <EOL> self . _cmsg . AddRepeatedScalar ( <EOL> self . _cfield_descriptor , value ) <EOL> def extend ( self , sequence ) : <EOL> for element in sequence : <EOL> self . append ( element ) <EOL> def insert ( self , key , value ) : <EOL> values = self [ slice ( None , None , None ) ] <EOL> values . insert ( key , value ) <EOL> self . _cmsg . AssignRepeatedScalar ( self . _cfield_descriptor , values ) <EOL> def remove ( self , value ) : <EOL> values = self [ slice ( None , None , None ) ] <EOL> values . remove ( value ) <EOL> self . _cmsg . AssignRepeatedScalar ( self . _cfield_descriptor , values ) <EOL> def __setitem__ ( self , key , value ) : <EOL> values = self [ slice ( None , None , None ) ] <EOL> values [ key ] = value <EOL> self . _cmsg . AssignRepeatedScalar ( self . _cfield_descriptor , values ) <EOL> def __getitem__ ( self , key ) : <EOL> return self . _cmsg . GetRepeatedScalar ( self . _cfield_descriptor , key ) <EOL> def __delitem__ ( self , key ) : <EOL> self . _cmsg . DeleteRepeatedField ( self . _cfield_descriptor , key ) <EOL> def __len__ ( self ) : <EOL> return len ( self [ slice ( None , None , None ) ] ) <EOL> def __eq__ ( self , other ) : <EOL> if self is other : <EOL> return True <EOL> if not isinstance ( other , collections . Sequence ) : <EOL> raise TypeError ( <EOL> '<STR_LIT>' ) <EOL> return other == self [ slice ( None , None , None ) ] <EOL> def __ne__ ( self , other ) : <EOL> return not self == other <EOL> def __hash__ ( self ) : <EOL> raise TypeError ( '<STR_LIT>' ) <EOL> def sort ( self , * args , ** kwargs ) : <EOL> if '<STR_LIT>' in kwargs : <EOL> kwargs [ '<STR_LIT>' ] = kwargs . pop ( '<STR_LIT>' ) <EOL> self . _cmsg . AssignRepeatedScalar ( self . _cfield_descriptor , <EOL> sorted ( self , * args , ** kwargs ) ) <EOL> def RepeatedScalarProperty ( cdescriptor ) : <EOL> """<STR_LIT>""" <EOL> def Getter ( self ) : <EOL> container = self . _composite_fields . get ( cdescriptor . name , None ) <EOL> if container is None : <EOL> container = RepeatedScalarContainer ( self , cdescriptor ) <EOL> self . _composite_fields [ cdescriptor . name ] = container <EOL> return container <EOL> def Setter ( self , new_value ) : <EOL> raise AttributeError ( '<STR_LIT>' <EOL> '<STR_LIT>' % cdescriptor . name ) <EOL> doc = '<STR_LIT>' % cdescriptor . name <EOL> return property ( Getter , Setter , doc = doc ) <EOL> class RepeatedCompositeContainer ( object ) : <EOL> """<STR_LIT>""" <EOL> __slots__ = [ '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ] <EOL> def __init__ ( self , msg , cfield_descriptor , subclass ) : <EOL> self . _message = msg <EOL> self . _cmsg = msg . _cmsg <EOL> self . _subclass = subclass <EOL> self . _cfield_descriptor = cfield_descriptor <EOL> def add ( self , ** kwargs ) : <EOL> cmessage = self . _cmsg . AddMessage ( self . _cfield_descriptor ) <EOL> return self . _subclass ( __cmessage = cmessage , __owner = self . _message , ** kwargs ) <EOL> def extend ( self , elem_seq ) : <EOL> """<STR_LIT>""" <EOL> for message in elem_seq : <EOL> self . add ( ) . MergeFrom ( message ) <EOL> def remove ( self , value ) : <EOL> self . __delitem__ ( self [ slice ( None , None , None ) ] . index ( value ) ) <EOL> def MergeFrom ( self , other ) : <EOL> for message in other [ : ] : <EOL> self . add ( ) . MergeFrom ( message ) <EOL> def __getitem__ ( self , key ) : <EOL> cmessages = self . _cmsg . GetRepeatedMessage ( <EOL> self . _cfield_descriptor , key ) <EOL> subclass = self . _subclass <EOL> if not isinstance ( cmessages , list ) : <EOL> return subclass ( __cmessage = cmessages , __owner = self . _message ) <EOL> return [ subclass ( __cmessage = m , __owner = self . _message ) for m in cmessages ] <EOL> def __delitem__ ( self , key ) : <EOL> self . _cmsg . DeleteRepeatedField ( <EOL> self . _cfield_descriptor , key ) <EOL> def __len__ ( self ) : <EOL> return self . _cmsg . FieldLength ( self . _cfield_descriptor ) <EOL> def __eq__ ( self , other ) : <EOL> """<STR_LIT>""" <EOL> if self is other : <EOL> return True <EOL> if not isinstance ( other , self . __class__ ) : <EOL> raise TypeError ( '<STR_LIT>' <EOL> '<STR_LIT>' ) <EOL> messages = self [ slice ( None , None , None ) ] <EOL> other_messages = other [ slice ( None , None , None ) ] <EOL> return messages == other_messages <EOL> def __hash__ ( self ) : <EOL> raise TypeError ( '<STR_LIT>' ) <EOL> def sort ( self , cmp = None , key = None , reverse = False , ** kwargs ) : <EOL> if cmp is None and '<STR_LIT>' in kwargs : <EOL> cmp = kwargs . pop ( '<STR_LIT>' ) <EOL> if key is None : <EOL> index_key = self . __getitem__ <EOL> else : <EOL> index_key = lambda i : key ( self [ i ] ) <EOL> indexes = list ( range ( len ( self ) ) ) <EOL> indexes . sort ( cmp = cmp , key = index_key , reverse = reverse ) <EOL> for dest , src in enumerate ( indexes ) : <EOL> if dest == src : <EOL> continue <EOL> self . _cmsg . SwapRepeatedFieldElements ( self . _cfield_descriptor , dest , src ) <EOL> indexes [ src ] = src <EOL> def RepeatedCompositeProperty ( cdescriptor , message_type ) : <EOL> """<STR_LIT>""" <EOL> def Getter ( self ) : <EOL> container = self . _composite_fields . get ( cdescriptor . name , None ) <EOL> if container is None : <EOL> container = RepeatedCompositeContainer ( <EOL> self , cdescriptor , message_type . _concrete_class ) <EOL> self . _composite_fields [ cdescriptor . name ] = container <EOL> return container <EOL> def Setter ( self , new_value ) : <EOL> raise AttributeError ( '<STR_LIT>' <EOL> '<STR_LIT>' % cdescriptor . name ) <EOL> doc = '<STR_LIT>' % cdescriptor . name <EOL> return property ( Getter , Setter , doc = doc ) <EOL> class ExtensionDict ( object ) : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self , msg ) : <EOL> self . _message = msg <EOL> self . _cmsg = msg . _cmsg <EOL> self . _values = { } <EOL> def __setitem__ ( self , extension , value ) : <EOL> from google . protobuf import descriptor <EOL> if not isinstance ( extension , descriptor . FieldDescriptor ) : <EOL> raise KeyError ( '<STR_LIT>' % ( extension , ) ) <EOL> cdescriptor = extension . _cdescriptor <EOL> if ( cdescriptor . label != _LABEL_OPTIONAL or <EOL> cdescriptor . cpp_type == _CPPTYPE_MESSAGE ) : <EOL> raise TypeError ( '<STR_LIT>' % ( <EOL> extension . full_name , ) ) <EOL> self . _cmsg . SetScalar ( cdescriptor , value ) <EOL> self . _values [ extension ] = value <EOL> def __getitem__ ( self , extension ) : <EOL> from google . protobuf import descriptor <EOL> if not isinstance ( extension , descriptor . FieldDescriptor ) : <EOL> raise KeyError ( '<STR_LIT>' % ( extension , ) ) <EOL> cdescriptor = extension . _cdescriptor <EOL> if ( cdescriptor . label != _LABEL_REPEATED and <EOL> cdescriptor . cpp_type != _CPPTYPE_MESSAGE ) : <EOL> return self . _cmsg . GetScalar ( cdescriptor ) <EOL> ext = self . _values . get ( extension , None ) <EOL> if ext is not None : <EOL> return ext <EOL> ext = self . _CreateNewHandle ( extension ) <EOL> self . _values [ extension ] = ext <EOL> return ext <EOL> def ClearExtension ( self , extension ) : <EOL> from google . protobuf import descriptor <EOL> if not isinstance ( extension , descriptor . FieldDescriptor ) : <EOL> raise KeyError ( '<STR_LIT>' % ( extension , ) ) <EOL> self . _cmsg . ClearFieldByDescriptor ( extension . _cdescriptor ) <EOL> if extension in self . _values : <EOL> del self . _values [ extension ] <EOL> def HasExtension ( self , extension ) : <EOL> from google . protobuf import descriptor <EOL> if not isinstance ( extension , descriptor . FieldDescriptor ) : <EOL> raise KeyError ( '<STR_LIT>' % ( extension , ) ) <EOL> return self . _cmsg . HasFieldByDescriptor ( extension . _cdescriptor ) <EOL> def _FindExtensionByName ( self , name ) : <EOL> """<STR_LIT>""" <EOL> return self . _message . _extensions_by_name . get ( name , None ) <EOL> def _CreateNewHandle ( self , extension ) : <EOL> cdescriptor = extension . _cdescriptor <EOL> if ( cdescriptor . label != _LABEL_REPEATED and <EOL> cdescriptor . cpp_type == _CPPTYPE_MESSAGE ) : <EOL> cmessage = self . _cmsg . NewSubMessage ( cdescriptor ) <EOL> return extension . message_type . _concrete_class ( __cmessage = cmessage ) <EOL> if cdescriptor . label == _LABEL_REPEATED : <EOL> if cdescriptor . cpp_type == _CPPTYPE_MESSAGE : <EOL> return RepeatedCompositeContainer ( <EOL> self . _message , cdescriptor , extension . message_type . _concrete_class ) <EOL> else : <EOL> return RepeatedScalarContainer ( self . _message , cdescriptor ) <EOL> assert False <EOL> return None <EOL> def NewMessage ( bases , message_descriptor , dictionary ) : <EOL> """<STR_LIT>""" <EOL> _AddClassAttributesForNestedExtensions ( message_descriptor , dictionary ) <EOL> _AddEnumValues ( message_descriptor , dictionary ) <EOL> _AddDescriptors ( message_descriptor , dictionary ) <EOL> return bases <EOL> def InitMessage ( message_descriptor , cls ) : <EOL> """<STR_LIT>""" <EOL> cls . _extensions_by_name = { } <EOL> _AddInitMethod ( message_descriptor , cls ) <EOL> _AddMessageMethods ( message_descriptor , cls ) <EOL> _AddPropertiesForExtensions ( message_descriptor , cls ) <EOL> copyreg . pickle ( cls , lambda obj : ( cls , ( ) , obj . __getstate__ ( ) ) ) <EOL> def _AddDescriptors ( message_descriptor , dictionary ) : <EOL> """<STR_LIT>""" <EOL> dictionary [ '<STR_LIT>' ] = { } <EOL> for field in message_descriptor . fields : <EOL> dictionary [ '<STR_LIT>' ] [ field . name ] = GetFieldDescriptor ( <EOL> field . full_name ) <EOL> dictionary [ '<STR_LIT>' ] = list ( dictionary [ '<STR_LIT>' ] . keys ( ) ) + [ <EOL> '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ] <EOL> def _AddEnumValues ( message_descriptor , dictionary ) : <EOL> """<STR_LIT>""" <EOL> for enum_type in message_descriptor . enum_types : <EOL> dictionary [ enum_type . name ] = enum_type_wrapper . EnumTypeWrapper ( enum_type ) <EOL> for enum_value in enum_type . values : <EOL> dictionary [ enum_value . name ] = enum_value . number <EOL> def _AddClassAttributesForNestedExtensions ( message_descriptor , dictionary ) : <EOL> """<STR_LIT>""" <EOL> extension_dict = message_descriptor . extensions_by_name <EOL> for extension_name , extension_field in list ( extension_dict . items ( ) ) : <EOL> assert extension_name not in dictionary <EOL> dictionary [ extension_name ] = extension_field <EOL> def _AddInitMethod ( message_descriptor , cls ) : <EOL> """<STR_LIT>""" <EOL> for field in message_descriptor . fields : <EOL> field_cdescriptor = cls . __descriptors [ field . name ] <EOL> if field . label == _LABEL_REPEATED : <EOL> if field . cpp_type == _CPPTYPE_MESSAGE : <EOL> value = RepeatedCompositeProperty ( field_cdescriptor , field . message_type ) <EOL> else : <EOL> value = RepeatedScalarProperty ( field_cdescriptor ) <EOL> elif field . cpp_type == _CPPTYPE_MESSAGE : <EOL> value = CompositeProperty ( field_cdescriptor , field . message_type ) <EOL> else : <EOL> value = ScalarProperty ( field_cdescriptor ) <EOL> setattr ( cls , field . name , value ) <EOL> constant_name = field . name . upper ( ) + '<STR_LIT>' <EOL> setattr ( cls , constant_name , field . number ) <EOL> def Init ( self , ** kwargs ) : <EOL> """<STR_LIT>""" <EOL> cmessage = kwargs . pop ( '<STR_LIT>' , None ) <EOL> if cmessage : <EOL> self . _cmsg = cmessage <EOL> else : <EOL> self . _cmsg = NewCMessage ( message_descriptor . full_name ) <EOL> owner = kwargs . pop ( '<STR_LIT>' , None ) <EOL> if owner : <EOL> self . _owner = owner <EOL> if message_descriptor . is_extendable : <EOL> self . Extensions = ExtensionDict ( self ) <EOL> else : <EOL> self . _HACK_REFCOUNTS = self <EOL> self . _composite_fields = { } <EOL> for field_name , field_value in list ( kwargs . items ( ) ) : <EOL> field_cdescriptor = self . __descriptors . get ( field_name , None ) <EOL> if not field_cdescriptor : <EOL> raise ValueError ( '<STR_LIT>' % field_name ) <EOL> if field_cdescriptor . label == _LABEL_REPEATED : <EOL> if field_cdescriptor . cpp_type == _CPPTYPE_MESSAGE : <EOL> field_name = getattr ( self , field_name ) <EOL> for val in field_value : <EOL> field_name . add ( ) . MergeFrom ( val ) <EOL> else : <EOL> getattr ( self , field_name ) . extend ( field_value ) <EOL> elif field_cdescriptor . cpp_type == _CPPTYPE_MESSAGE : <EOL> getattr ( self , field_name ) . MergeFrom ( field_value ) <EOL> else : <EOL> setattr ( self , field_name , field_value ) <EOL> Init . __module__ = None <EOL> Init . __doc__ = None <EOL> cls . __init__ = Init <EOL> def _IsMessageSetExtension ( field ) : <EOL> """<STR_LIT>""" <EOL> return ( field . is_extension and <EOL> field . containing_type . has_options and <EOL> field . containing_type . GetOptions ( ) . message_set_wire_format and <EOL> field . type == _TYPE_MESSAGE and <EOL> field . message_type == field . extension_scope and <EOL> field . label == _LABEL_OPTIONAL ) <EOL> def _AddMessageMethods ( message_descriptor , cls ) : <EOL> """<STR_LIT>""" <EOL> if message_descriptor . is_extendable : <EOL> def ClearExtension ( self , extension ) : <EOL> self . Extensions . ClearExtension ( extension ) <EOL> def HasExtension ( self , extension ) : <EOL> return self . Extensions . HasExtension ( extension ) <EOL> def HasField ( self , field_name ) : <EOL> return self . _cmsg . HasField ( field_name ) <EOL> def ClearField ( self , field_name ) : <EOL> child_cmessage = None <EOL> if field_name in self . _composite_fields : <EOL> child_field = self . _composite_fields [ field_name ] <EOL> del self . _composite_fields [ field_name ] <EOL> child_cdescriptor = self . __descriptors [ field_name ] <EOL> if ( child_cdescriptor . label != _LABEL_REPEATED and <EOL> child_cdescriptor . cpp_type == _CPPTYPE_MESSAGE ) : <EOL> child_field . _owner = None <EOL> child_cmessage = child_field . _cmsg <EOL> if child_cmessage is not None : <EOL> self . _cmsg . ClearField ( field_name , child_cmessage ) <EOL> else : <EOL> self . _cmsg . ClearField ( field_name ) <EOL> def Clear ( self ) : <EOL> cmessages_to_release = [ ] <EOL> for field_name , child_field in list ( self . _composite_fields . items ( ) ) : <EOL> child_cdescriptor = self . __descriptors [ field_name ] <EOL> if ( child_cdescriptor . label != _LABEL_REPEATED and <EOL> child_cdescriptor . cpp_type == _CPPTYPE_MESSAGE ) : <EOL> child_field . _owner = None <EOL> cmessages_to_release . append ( ( child_cdescriptor , child_field . _cmsg ) ) <EOL> self . _composite_fields . clear ( ) <EOL> self . _cmsg . Clear ( cmessages_to_release ) <EOL> def IsInitialized ( self , errors = None ) : <EOL> if self . _cmsg . IsInitialized ( ) : <EOL> return True <EOL> if errors is not None : <EOL> errors . extend ( self . FindInitializationErrors ( ) ) ; <EOL> return False <EOL> def SerializeToString ( self ) : <EOL> if not self . IsInitialized ( ) : <EOL> raise message . EncodeError ( <EOL> '<STR_LIT>' % ( <EOL> self . _cmsg . full_name , '<STR_LIT:U+002C>' . join ( self . FindInitializationErrors ( ) ) ) ) <EOL> return self . _cmsg . SerializeToString ( ) <EOL> def SerializePartialToString ( self ) : <EOL> return self . _cmsg . SerializePartialToString ( ) <EOL> def ParseFromString ( self , serialized ) : <EOL> self . Clear ( ) <EOL> self . MergeFromString ( serialized ) <EOL> def MergeFromString ( self , serialized ) : <EOL> byte_size = self . _cmsg . MergeFromString ( serialized ) <EOL> if byte_size < <NUM_LIT:0> : <EOL> raise message . DecodeError ( '<STR_LIT>' ) <EOL> return byte_size <EOL> def MergeFrom ( self , msg ) : <EOL> if not isinstance ( msg , cls ) : <EOL> raise TypeError ( <EOL> "<STR_LIT>" <EOL> "<STR_LIT>" % ( cls . __name__ , type ( msg ) . __name__ ) ) <EOL> self . _cmsg . MergeFrom ( msg . _cmsg ) <EOL> def CopyFrom ( self , msg ) : <EOL> self . _cmsg . CopyFrom ( msg . _cmsg ) <EOL> def ByteSize ( self ) : <EOL> return self . _cmsg . ByteSize ( ) <EOL> def SetInParent ( self ) : <EOL> return self . _cmsg . SetInParent ( ) <EOL> def ListFields ( self ) : <EOL> all_fields = [ ] <EOL> field_list = self . _cmsg . ListFields ( ) <EOL> fields_by_name = cls . DESCRIPTOR . fields_by_name <EOL> for is_extension , field_name in field_list : <EOL> if is_extension : <EOL> extension = cls . _extensions_by_name [ field_name ] <EOL> all_fields . append ( ( extension , self . Extensions [ extension ] ) ) <EOL> else : <EOL> field_descriptor = fields_by_name [ field_name ] <EOL> all_fields . append ( <EOL> ( field_descriptor , getattr ( self , field_name ) ) ) <EOL> all_fields . sort ( key = lambda item : item [ <NUM_LIT:0> ] . number ) <EOL> return all_fields <EOL> def FindInitializationErrors ( self ) : <EOL> return self . _cmsg . FindInitializationErrors ( ) <EOL> def __str__ ( self ) : <EOL> return str ( self . _cmsg ) <EOL> def __eq__ ( self , other ) : <EOL> if self is other : <EOL> return True <EOL> if not isinstance ( other , self . __class__ ) : <EOL> return False <EOL> return self . ListFields ( ) == other . ListFields ( ) <EOL> def __ne__ ( self , other ) : <EOL> return not self == other <EOL> def __hash__ ( self ) : <EOL> raise TypeError ( '<STR_LIT>' ) <EOL> def __unicode__ ( self ) : <EOL> from google . protobuf import text_format <EOL> return text_format . MessageToString ( self , as_utf8 = True ) . decode ( '<STR_LIT:utf-8>' ) <EOL> for key , value in list ( locals ( ) . copy ( ) . items ( ) ) : <EOL> if key not in ( '<STR_LIT:key>' , '<STR_LIT:value>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ) : <EOL> setattr ( cls , key , value ) <EOL> def RegisterExtension ( extension_handle ) : <EOL> extension_handle . containing_type = cls . DESCRIPTOR <EOL> cls . _extensions_by_name [ extension_handle . full_name ] = extension_handle <EOL> if _IsMessageSetExtension ( extension_handle ) : <EOL> cls . _extensions_by_name [ <EOL> extension_handle . message_type . full_name ] = extension_handle <EOL> cls . RegisterExtension = staticmethod ( RegisterExtension ) <EOL> def FromString ( string ) : <EOL> msg = cls ( ) <EOL> msg . MergeFromString ( string ) <EOL> return msg <EOL> cls . FromString = staticmethod ( FromString ) <EOL> def _AddPropertiesForExtensions ( message_descriptor , cls ) : <EOL> """<STR_LIT>""" <EOL> extension_dict = message_descriptor . extensions_by_name <EOL> for extension_name , extension_field in list ( extension_dict . items ( ) ) : <EOL> constant_name = extension_name . upper ( ) + '<STR_LIT>' <EOL> setattr ( cls , constant_name , extension_field . number ) </s>
