code: def should_strip_ansi(stream=None, color=None):
      if color is None:
          if stream is None:
              stream = sys.stdin
          return not isatty(stream) and not _is_jupyter_kernel_output(
              stream
          )
      return not color
  
imports: import codecs
  import io
  import os
  import re
  import sys
  from weakref import WeakKeyDictionary
label_desc: Use image node_id 10 for calling a global function with example usage: should_strip_ansi(stream, color) and returns: unknown, unknown