docs: private int sequentialFailureCount(List<AuditEvent> events) {
          int failureCount = 0;
          for (AuditEvent event : events) {
              if (event.getType() == failureEventType) {
                  failureCount++;
              } else if (event.getType() == successEventType) {
                  // Successful authentication occurred within last allowable
                  // failures, so ignore
                  break;
              }
          }
          return failureCount;
      }