code: def _format_final_exc_line(etype, value):
      valuestr = _safe_string(value, "exception")
      if value is None or not valuestr:
          line = "%s\n" % etype
      else:
          line = "%s: %s\n" % (etype, valuestr)
      return line
  
imports: import collections.abc
  import itertools
  import linecache
  import sys
  import textwrap
  from contextlib import suppress
label_desc: Use image node_id 10 for calling a global function with example usage: _format_final_exc_line(etype, value) and returns: line