private static boolean belongsToSpecifiedClassHierarchy(@Nullable PsiElement element,
                                                          @NotNull PyClass cls,
                                                          @NotNull TypeEvalContext context) {
    final PyClass parent = PsiTreeUtil.getStubOrPsiParentOfType(element, PyClass.class);
    return parent != null && (cls.isSubclass(parent, context) || parent.isSubclass(cls, context));
  }
private static boolean belongsToSpecifiedClassHierarchy(@Nullable PsiElement element,
                                                          @NotNull PyClass cls,
                                                          @NotNull TypeEvalContext context)