boolean (PyClass parent, @Nullable TypeEvalContext context) { if (this == parent) { return true; } for (PyClass superclass : getAncestorClasses(context)) { if (parent == superclass) return true; } return false; }