void (@NotNull LocalInspectionToolSession session, @NotNull ProblemsHolder holder) { final PyUnresolvedReferencesVisitor visitor = session.getUserData(KEY); assert visitor != null; ReadAction.run( () -> { if (PyCodeInsightSettings.getInstance().HIGHLIGHT_UNUSED_IMPORTS) { visitor.highlightUnusedImports(); } visitor.highlightImportsInsideGuards(); } ); session.putUserData(KEY, null); }