code: def test_end_pos_error_correction(each_version):
      """
      Source code without ending newline are given one, because the Python
      grammar needs it. However, they are removed again. We still want the right
      end_pos, even if something breaks in the parser (error correction).
      """
      s = "def x():\n ."
      m = parse(s, version=each_version)
      func = m.children[0]
      assert func.type == "funcdef"
      assert func.end_pos == (2, 2)
      assert m.end_pos == (2, 2)
  
imports: from textwrap import dedent
  import pytest
  from parso._compatibility import u
  from parso import parse
  from parso.python import tree
  from parso.utils import split_lines
label_desc: Use image node_id 8 for calling a global function with example usage: test_end_pos_error_correction(each_version) without return types