code: @Override
    public @NotNull SortedSet<MediaFormat> getMediaFormats(@NotNull Comparator<MediaFormat> comparator) {
      SortedSet<MediaFormat> set = new TreeSet<>(comparator);
      set.addAll(getMediaFormatsForCurrentResource());
      return ImmutableSortedSet.copyOf(set);
    }
docs: Get media formats defined by a CMS application that is responsible for the given media library path.
  @param comparator Comparator for set
  @return Media formats