<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def disable_if_no_tty(cls):
 """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 """

        if sys.stdout.isatty() or sys.stderr.isatty():
            return False
        cls.disable_all_colors()
        return True