code: public static Optional<JobReturnEvent> parse(Event event) {
          Matcher matcher = PATTERN.matcher(event.getTag());
          if (matcher.matches()) {
              Data data = event.getData(Data.class);
              JobReturnEvent result = new JobReturnEvent(matcher.group(1), matcher.group(2),
                      data);
              return Optional.of(result);
          } else {
              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