def streams_are_fine():
import io<EOL>for stream in (sys.stdout, sys.stderr, sys.stdin):<EOL><INDENT>if not isinstance(stream, io.IOBase):<EOL><INDENT>return False<EOL><DEDENT><DEDENT>return True<EOL>
Check if streams are being overwritten,
    for example, by pytest

    stream inference will not work if they are overwritten

    PY3 only