code: def auto_disable(
          enabled: Optional[bool] = True,
          fds: Optional[Sequence[IO]] = (sys.stdout, sys.stderr)) -> None:
      
      if enabled:
          if not all(getattr(f, 'isatty', lambda: False)() for f in fds):
              disable()
      else:
          enable()
docs: Automatically decide whether to disable color codes if stdout or
          stderr are not ttys.
  
          Arguments:
              enabled  : Whether to automatically disable color codes.
                         When set to True, the fds will be checked for ttys.
                         When set to False, enable() is called.
              fds      : Open file descriptors to check for ttys.
                         If any non-ttys are found, colors will be disabled.
                         Objects must have a isatty() method.