#NEWLINE# def _sync_code( self ) : #NEWLINE# #INDENT# 'Syncs the current state of self.lines with self.code, the\n        serializable string representing the set of code.\n        ' #NEWLINE# new_code = [ ] #NEWLINE# for line in self . lines : #NEWLINE# #INDENT# if isinstance ( line , CodeAnswer ) : #NEWLINE# #INDENT# new_code . append ( line . dump ( ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# new_code . append ( line ) #NEWLINE# #UNINDENT# #UNINDENT# self . code = '\n' . join ( new_code )