nl: or string 'ANICON' is in os.environ, substitute the evaluated boolean for supported_platform. if sys.stdout has an attribute named 'isatty' and call to the sys.stdout.isatty returns boolean True, substitute True for is_a_tty.
code: is_a_tty = hasattr ( sys . stdout , 'isatty' ) and sys . stdout . isatty ( )