private static boolean isExceptionClass(@NotNull PyClass cls, @NotNull TypeEvalContext context) {
      if (PyBroadExceptionInspection.equalsException(cls, context)) {
        return true;
      }

      return cls.getAncestorClasses(context)
        .stream()
        .anyMatch(baseClass -> PyBroadExceptionInspection.equalsException(baseClass, context));
    }
private static boolean isExceptionClass(@NotNull PyClass cls, @NotNull TypeEvalContext context)