function clone(obj) {
  const res = {};
  for (const key in obj) {
    res[key] = obj[key];
  }
  return res;
}
Returns a shallow clone of the object.
@param {?Object<K,V>} obj Object to clone.
@return {!Object<K,V>} Clone of the input object.
@template K,V