#NEWLINE# def _to_dict( self , backref ) : #NEWLINE# #INDENT# dct = dict ( ) #NEWLINE# for ( refname , entity ) in six . iteritems ( self ) : #NEWLINE# #INDENT# if ( ( refname != backref ) and ( refname not in self . _filter_fields ) ) : #NEWLINE# #INDENT# childs_backref = None #NEWLINE# if ( refname in self . _children ) : #NEWLINE# #INDENT# childs_backref = self . _children [ refname ] [ 1 ] #NEWLINE# #UNINDENT# dct [ refname ] = self . _entity_to_dict ( entity , childs_backref ) #NEWLINE# sanitize = self . _sanitize_fields . get ( refname ) #NEWLINE# if ( sanitize is not None ) : #NEWLINE# #INDENT# dct [ refname ] = sanitize ( self , dct [ refname ] ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# return dct