@NotNull
  @Override
  public PsiElementVisitor buildVisitor(@NotNull ProblemsHolder holder, boolean isOnTheFly, @NotNull LocalInspectionToolSession session) {
    return new PyInspectionVisitor(holder, PyInspectionVisitor.getContext(session)) {
      @Override
      public void visitPyFunction(@NotNull PyFunction function) {
        if (function.getTypeComment() == null &&
            !typeAnnotationsExist(function) &&
            PyiUtil.getOverloads(function, getResolveContext().getTypeEvalContext()).isEmpty()) {
          boolean flag = shouldRegisterProblem(function);
          if (flag) {
            ASTNode nameNode = function.getNameNode();
            if (nameNode != null) {
              registerProblem(nameNode.getPsi(),
                              PyPsiBundle.message("INSP.missing.type.hints.type.hinting.missing.for.function.definition"),
                              new AddTypeHintsQuickFix(function.getName()));
            }
          }
        }
      }
    };
  }
@NotNull
  @Override
  public PsiElementVisitor buildVisitor(@NotNull ProblemsHolder holder, boolean isOnTheFly, @NotNull LocalInspectionToolSession session)