String (@NotNull VirtualFile file, @NotNull Module module) { ApplicationManager.getApplication().assertReadAccessAllowed(); final PsiFile psiFile = PsiManager.getInstance(module.getProject()).findFile(file); if (psiFile instanceof PyFile) { final List<PyImportElement> importTargets = ((PyFile)psiFile).getImportTargets(); for (PyImportElement importElement : importTargets) { String name = importElement.getVisibleName(); if (name != null) { @NonNls String runnerId = findSdkByPackage(name); if (runnerId != null) return runnerId; } } } return ""; }