@Override
  public final void inspectionFinished(@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);
  }
@Override
  public final void inspectionFinished(@NotNull LocalInspectionToolSession session, @NotNull ProblemsHolder holder)