code: def format_exception_only(exc, /, value=_sentinel):
      """Format the exception part of a traceback.
  
      The return value is a list of strings, each ending in a newline.
  
      The list contains the exception's message, which is
      normally a single string; however, for :exc:`SyntaxError` exceptions, it
      contains several lines that (when printed) display detailed information
      about where the syntax error occurred. Following the message, the list
      contains the exception's ``__notes__``.
      """
      if value is _sentinel:
          value = exc
      te = TracebackException(type(value), value, None, compact=True)
      return list(te.format_exception_only())
  
imports: import collections.abc
  import itertools
  import linecache
  import sys
  import textwrap
  from contextlib import suppress
label_desc: Use image node_id 9 for calling a global function with example usage: format_exception_only(value) and returns: list