def __str__(self) -> str:
try:<EOL><INDENT>in_terminal = os.isatty(sys.stdout.fileno())<EOL><DEDENT>except OSError:  <EOL><INDENT>in_terminal = False<EOL><DEDENT>if in_terminal:  <EOL><INDENT>return self._repr_tty_()<EOL><DEDENT>else:<EOL><INDENT>return self.__repr__()<EOL><DEDENT>
Prints a summary representation of this :class:`SampleSheet`.

        If the ``__str__()`` method is called on a device that identifies as a
        TTY then render a TTY compatible representation. If no TTY is detected
        then return the invocable representation of this instance.