boolean (PsiElement element) { return super.isValidIntroduceContext(element) && PsiTreeUtil.getParentOfType(element, PyFunction.class, false, PyClass.class) != null && PsiTreeUtil.getParentOfType(element, PyDecoratorList.class) == null && !isInStaticMethod(element); }