def message_for_exception(exception: Exception, message: str) -> Sequence[Token]:
tb = sys.exc_info()[<NUM_LIT:2>]<EOL>buffer = io.StringIO()<EOL>traceback.print_tb(tb, file=io)  <EOL>return (<EOL>red, message + "<STR_LIT:\n>",<EOL>exception.__class__.__name__,<EOL>str(exception), "<STR_LIT:\n>",<EOL>reset, buffer.getvalue()<EOL>)<EOL>
Returns a tuple suitable for cli_ui.error()
    from the given exception.
    (Traceback will be part of the message, after
    the ``message`` argument)

    Useful when the exception occurs in an other thread
    than the main one.