boolean (PsiElement hook) { if (hook instanceof PyReferenceExpression) { final PyExpression qualifier = ((PyReferenceExpression)hook).getQualifier(); return qualifier instanceof PyCallExpression && ((PyCallExpression)qualifier).isCalleeText(PyNames.SUPER); } return false; }