String (@NotNull PyFile file) { if (PyUtil.isPackage(file)) { final PsiDirectory dir = file.getContainingDirectory(); if (dir != null) { return dir.getName(); } } return FileUtilRt.getNameWithoutExtension(file.getName()); }