code: def _get_actual_exception(code):
      with warnings.catch_warnings():
          # We don't care about warnings where locals/globals misbehave here.
          # It's as simple as either an error or not.
          warnings.filterwarnings("ignore", category=SyntaxWarning)
          try:
              compile(code, "<unknown>", "exec")
          except (SyntaxError, IndentationError) as e:
              wanted = e.__class__.__name__ + ": " + e.msg
              line_nr = e.lineno
          except ValueError as e:
              # The ValueError comes from byte literals in Python 2 like '\x'
              # that are oddly enough not SyntaxErrors.
              wanted = "SyntaxError: (value error) " + str(e)
              line_nr = None
          else:
              assert (
                  False
              ), "The piece of code should raise an exception."
  
      # SyntaxError
      if wanted == "SyntaxError: assignment to keyword":
          return [
              wanted,
              "SyntaxError: can't assign to keyword",
              "SyntaxError: cannot assign to __debug__",
          ], line_nr
      elif wanted == "SyntaxError: f-string: unterminated string":
          wanted = "SyntaxError: EOL while scanning string literal"
      elif (
          wanted
          == "SyntaxError: f-string expression part cannot include a backslash"
      ):
          return [
              wanted,
              "SyntaxError: EOL while scanning string literal",
              "SyntaxError: unexpected character after line continuation character",
          ], line_nr
      elif wanted == "SyntaxError: f-string: expecting '}'":
          wanted = "SyntaxError: EOL while scanning string literal"
      elif (
          wanted
          == "SyntaxError: f-string: empty expression not allowed"
      ):
          wanted = "SyntaxError: invalid syntax"
      elif (
          wanted
          == "SyntaxError: f-string expression part cannot include '#'"
      ):
          wanted = "SyntaxError: invalid syntax"
      elif wanted == "SyntaxError: f-string: single '}' is not allowed":
          wanted = "SyntaxError: invalid syntax"
      return [wanted], line_nr
  
imports: import sys
  import warnings
  import pytest
  import parso
  from textwrap import dedent
  from parso._compatibility import is_pypy
  from .failing_examples import FAILING_EXAMPLES, indent, build_nested
label_desc: Use image node_id 7 for calling a global function with example usage: _get_actual_exception(code) and returns: list,  line_nr, list,  line_nr, list,  line_nr