function setAll(map, entries) {
  if (!entries) return;
  for (const [k, v] of entries) {
    map.set(k, v);
  }
}
Iterates over each entry in the given entries and sets the entry in
the map, overwriting any existing entries for the key.
@param {!MapLike<K,V>} map The map to set entries on.
@param {?Iterable<!Array<K|V>>} entries The iterable of entries. This
    iterable should really be of type Iterable<Array<[K,V]>>, but the tuple
    type is not representable in the Closure Type System.
@template K,V