code: Map<K, V> fixedSnapshot(Supplier<Iterator<Node<K, V>>> iteratorSupplier,
        int limit, Function<V, V> transformer) {
      requireArgument(limit >= 0);
      evictionLock.lock();
      try {
        maintenance(/* ignored */ null);
  
        int initialCapacity = Math.min(limit, size());
        Iterator<Node<K, V>> iterator = iteratorSupplier.get();
        Map<K, V> map = new LinkedHashMap<>(initialCapacity);
        while ((map.size() < limit) && iterator.hasNext()) {
          Node<K, V> node = iterator.next();
          K key = node.getKey();
          V value = transformer.apply(node.getValue());
          if ((key != null) && (value != null) && node.isAlive()) {
            map.put(key, value);
          }
        }
        return Collections.unmodifiableMap(map);
      } finally {
        evictionLock.unlock();
      }
    }
docs: Returns an unmodifiable snapshot map ordered by the provided iterator. Beware that obtaining
  the mappings is <em>NOT</em> a constant-time operation.
  
  @param iteratorSupplier the iterator
  @param limit the maximum number of entries
  @param transformer a function that unwraps the value
  @return an unmodifiable snapshot in the iterator's order