private static InspectionProfileEntry getLocalTool(InspectionToolWrapper<?, ?> tool) {
    InspectionProfileEntry inspection = tool.getTool();
    if (inspection instanceof GlobalInspectionTool global) {
      return global.getSharedLocalInspectionTool();
    }
    return inspection;
  }
private static InspectionProfileEntry getLocalTool(InspectionToolWrapper<?, ?> tool)