#NEWLINE# def to_json( self ) : #NEWLINE# #INDENT# 'Returns writer state to serialize in json.\n\n    Returns:\n      A json-izable version of the OutputWriter state.\n    ' #NEWLINE# for pool in self . _pools : #NEWLINE# #INDENT# if ( pool is not None ) : #NEWLINE# #INDENT# pool . flush ( True ) #NEWLINE# #UNINDENT# #UNINDENT# return { #NEWLINE# #INDENT# 'filehandles' : pickle . dumps ( pool . _filehandles ) , #NEWLINE# #UNINDENT# }