code: public static Optional<BatchStartedEvent> parse(Event event) {
          Matcher matcher = PATTERN.matcher(event.getTag());
          if (matcher.matches()) {
              return Optional.of(new BatchStartedEvent(matcher.group(1), event.getData(Data.class)));
          }
          return Optional.empty();
      }
docs: Utility method to parse a generic event into a more specific one.
  
  @param event the generic event to parse
  @return an option containing the parsed value or non if it could not be parsed