code: def test_with_stmt_get_test_node_from_name():
      code = "with A as X.Y, B as (Z), C as Q[0], D as Q['foo']: pass"
      with_stmt = parse(code, version="3").children[0]
      tests = [
          with_stmt.get_test_node_from_name(name).value
          for name in with_stmt.get_defined_names(include_setitem=True)
      ]
      assert tests == ["A", "B", "C", "D"]
  
imports: from textwrap import dedent
  import pytest
  from parso import parse
  from parso.python import tree
  from parso.tree import search_ancestor
label_desc: Use image node_id 15 for calling a global function with example usage: test_with_stmt_get_test_node_from_name() without return types