boolean (PsiElement element) { final PyDecorator decorator = PsiTreeUtil.getParentOfType(element, PyDecorator.class); if (decorator != null && PsiTreeUtil.isAncestor(decorator.getCallee(), element, false)) { return false; } return PsiTreeUtil.getParentOfType(element, PyParameterList.class) == null; }