public static <K, V> Map<K, List<V>> makeMutableMultimap(Map<K, List<V>> map) {
    var mutableMap = makeMutableMap(map);
    if (mutableMap != null) {
      for (var entry : map.entrySet()) {
        var key = entry.getKey();
        var value = entry.getValue();
        var mutableList = makeMutable(value);
        if (mutableList != value) {
          mutableMap.put(key, mutableList);
        }
      }
    }
    return mutableMap;
  }
Return a mutable copy of {@code map} with mutable list values or the original collections if they are already
mutable.
planetiler-core/src/main/java/com/onthegomap/planetiler/util/MutableCollections.java