#NEWLINE# @ contextmanager #NEWLINE# def patched_input( code ) : #NEWLINE# #INDENT# 'Monkey patch code as though it were coming from stdin.' #NEWLINE# def lines( ) : #NEWLINE# #INDENT# for line in code . splitlines ( ) : #NEWLINE# #INDENT# ( yield line ) #NEWLINE# #UNINDENT# raise EOFError ( ) #NEWLINE# #UNINDENT# def patch_raw_input( lines = lines ( ) ) : #NEWLINE# #INDENT# return next ( lines ) #NEWLINE# #UNINDENT# try : #NEWLINE# #INDENT# raw_input = yapf . py3compat . raw_input #NEWLINE# yapf . py3compat . raw_input = patch_raw_input #NEWLINE# ( yield ) #NEWLINE# #UNINDENT# finally : #NEWLINE# #INDENT# yapf . py3compat . raw_input = raw_input