boolean (@NotNull PyExpression calleeQualifier, @NotNull PyClass cls, @NotNull TypeEvalContext context) { final PsiElement callingClass = resolveCallingClass(calleeQualifier); return callingClass != null && cls.getAncestorClasses(context) .stream() .anyMatch(callingClass::equals); }