@Override
    public void visitPyRaiseStatement(@NotNull PyRaiseStatement node) {
      PyExpression[] expressions = node.getExpressions();
      if (expressions.length == 0) {
        return;
      }
      PyExpression expression = expressions[0];
      if (expression instanceof PyCallExpression) {
        PyExpression callee = ((PyCallExpression)expression).getCallee();
        if (callee instanceof PyReferenceExpression) {
          final PsiPolyVariantReference reference = ((PyReferenceExpression)callee).getReference(getResolveContext());
          PsiElement psiElement = reference.resolve();
          if (psiElement instanceof PyClass aClass) {
            List<PyClassLikeType> selfAndAncestorTypes = ContainerUtil.prepend(aClass.getAncestorTypes(myTypeEvalContext),
                                                                               aClass.getType(myTypeEvalContext));
            for (PyClassLikeType type : selfAndAncestorTypes) {
              if (type == null) {
                return;
              }
              final String name = type.getName();
              if (name == null || "BaseException".equals(name)) {
                return;
              }
            }
            registerProblem(expression,
                            PyPsiBundle.message("INSP.exception.inheritance.exception.does.not.inherit.from.base.exception.class"),
                            new PyAddExceptionSuperClassQuickFix());
          }
        }
      }
    }
@Override
    public void visitPyRaiseStatement(@NotNull PyRaiseStatement node)