#NEWLINE# def _validate_write( self , data ) : #NEWLINE# #INDENT# 'Convert Python objects to XML values.\n\n        If attribute should not be sent, remove it from the body.\n        ' #NEWLINE# update = ( 'id' in self . properties ) #NEWLINE# if ( ( 'version' not in data ) and update ) : #NEWLINE# #INDENT# data [ 'version' ] = self . version #NEWLINE# #UNINDENT# for ( key , value ) in six . iteritems ( data . copy ( ) ) : #NEWLINE# #INDENT# push_fn = self . _push . get ( key , False ) #NEWLINE# if self . _conds_for_removal ( key , update , push_fn ) : #NEWLINE# #INDENT# del data [ key ] #NEWLINE# continue #NEWLINE# #UNINDENT# if ( push_fn is not None ) : #NEWLINE# #INDENT# data [ key ] = self . _push [ key ] ( value ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# data [ key ] = value #NEWLINE# #UNINDENT# #UNINDENT# return data