#NEWLINE# def encode( self ) : #NEWLINE# #INDENT# f = io . BytesIO ( ) #NEWLINE# f . write ( chr ( carrier_power_states . index ( self . carrier_power_state ) ) ) #NEWLINE# f . write ( chr ( len ( self . carrier_data_reference ) ) ) #NEWLINE# f . write ( self . carrier_data_reference ) #NEWLINE# f . write ( chr ( len ( f . auxiliary_data_reference_list ) ) ) #NEWLINE# for auxiliary_data_reference in self . auxiliary_data_reference_list : #NEWLINE# #INDENT# f . write ( chr ( len ( auxiliary_data_reference ) ) ) #NEWLINE# f . write ( auxiliary_data_reference ) #NEWLINE# #UNINDENT# f . seek ( 0 , 0 ) #NEWLINE# return f . read ( )