private @Nullable <T> T findFirst(Class<?> clazz, @NotNull Function<? super PresentationTemplate, ? extends T> f) {
    Set<PresentationTemplate> templates = mySuperClasses.get(clazz);
    for (PresentationTemplate template : templates) {
      T result = f.apply(template);
      if (result != null) {
        return result;
      }
    }
    return null;
  }
private @Nullable <T> T findFirst(Class<?> clazz, @NotNull Function<? super PresentationTemplate, ? extends T> f)