code: def test_python_exception_matches(code):
      wanted, line_nr = _get_actual_exception(code)
  
      errors = _get_error_list(code)
      actual = None
      if errors:
          (error,) = errors
          actual = error.message
      assert actual in wanted
      # Somehow in Python2.7 the SyntaxError().lineno is sometimes None
      assert line_nr is None or line_nr == error.start_pos[0]
  
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 3 for calling a global function with example usage: test_python_exception_matches(code) without return types