PsiElement (PyFunction node) { if (node == null) return null; final ASTNode nameNode = node.getNameNode(); PsiElement markable = node; if (nameNode != null) markable = nameNode.getPsi(); return markable; }