def _PrintErrorAndExit(stream, msg, exit_code=2):
 stream.write(msg)
 sys.exit(exit_code)

def _PrintErrorAndExit ( stream , msg , exit_code = 2 ) : stream . write ( msg ) sys . exit ( exit_code )
prints the given error message and exists the program .