function transpose(obj) {
  const transposed = {};
  for (const key in obj) {
    transposed[obj[key]] = key;
  }
  return transposed;
}
Returns a new object in which all the keys and values are interchanged
(keys become values and values become keys). If multiple keys map to the
same value, the chosen transposed value is implementation-dependent.
@param {?Object} obj The object to transpose.
@return {!Object} The transposed object.