code: def disable_if_no_tty(cls):
          
          if sys.stdout.isatty() or sys.stderr.isatty():
              return False
          cls.disable_all_colors()
          return True
docs: Disable all colors only if there is no TTY available.
  
          :return: True if colors are disabled, False if stderr or stdout is a TTY.
          :rtype: bool