String (@NotNull PsiNamedElement element) { if (element instanceof PyFile) { VirtualFile virtualFile = PsiUtilBase.asVirtualFile(PyUtil.turnInitIntoDir(element)); if (virtualFile != null) { return virtualFile.getNameWithoutExtension(); } return null; } return element.getName(); }