code: def test_import_names(each_version):
      def get_import(source):
          return next(
              parse(source, version=each_version).iter_imports()
          )
  
      imp = get_import("import math\n")
      names = imp.get_defined_names()
      assert len(names) == 1
      assert names[0].value == "math"
      assert names[0].start_pos == (1, len("import "))
      assert names[0].end_pos == (1, len("import math"))
  
      assert imp.start_pos == (1, 0)
      assert imp.end_pos == (1, len("import math"))
  
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 3 for calling a global function with example usage: test_import_names(each_version) and returns: next