function forEach(obj, f, opt_obj) {
  for (const key in obj) {
    f.call(/** @type {?} */ (opt_obj), obj[key], key, obj);
  }
}
Calls a function for each element in an object/map/hash.
@param {?Object<K,V>} obj The object over which to iterate.
@param {function(this:T,V,?,?Object<K,V>):?} f The function to call for every
    element. This function takes 3 arguments (the value, the key and the
    object) and the return value is ignored.
@param {T=} opt_obj This is used as the 'this' object within f.
@return {void}
@template T,K,V