Return the original stdout set by record_original_stdout() or sys.stdout if it’s not set.
test.support/get_original_stdout
get_original_stdout