boolean (PsiElement element, PsiElement resolveResult) { if (element instanceof PyFunction && ((PyFunction) element).getContainingClass() != null && resolveResult instanceof PyTargetExpression) { final PyExpression assignedValue = ((PyTargetExpression)resolveResult).findAssignedValue(); if (assignedValue instanceof PyCallExpression call) { final Pair<String,PyFunction> functionPair = PyCallExpressionHelper.interpretAsModifierWrappingCall(call); if (functionPair != null && functionPair.second == element) { return true; } } } return false; }