docs: public static <K, V> Map<K, V> sort(Map<K, V> map,
              Comparator<K> comparator) {
          TreeMap<K, V> sortedMap = new TreeMap<>(comparator);
          sortedMap.putAll(map);
          return sortedMap;
      }