def METHOD_NAME(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'))