List<QualifiedName> (@NotNull PsiElement foothold, @NotNull VirtualFile vfile) { final PythonPathCache cache = ResolveImportUtil.getPathCache(foothold); final List<QualifiedName> names = cache != null ? cache.getNames(vfile) : null; if (names != null) { return names; } PathChoosingVisitor visitor = new PathChoosingVisitor(vfile); RootVisitorHost.visitRoots(foothold, visitor); final List<QualifiedName> results = visitor.getResults(); if (cache != null) { cache.putNames(vfile, results); } return results; }